> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.bitbybit.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Create store location

> Register a new pickup origin. Set `mainAddress: true` to make this the default; any previous main location will be unset automatically.

For KiriminAja Express quoting you must also populate `districtId` and `subDistrictId` from `GET /shipping/coverage/districts` and `GET /shipping/coverage/sub-districts`.



## OpenAPI

````yaml POST /shipping/store-locations
openapi: 3.1.0
info:
  title: bitbybit Open API — Shipping
  description: >-
    Programmatic access to bitbybit shipping: store locations, provider
    discovery, coverage lookup, fee quoting, and the full shipment lifecycle
    (create, book, update, cancel, track) across GoSend, KiriminAja, and
    RideBlitz.
  version: 1.0.0
  contact:
    name: bitbybit Support
    url: https://bitbybit.studio
servers:
  - url: https://api.bitbybit.studio/customer/api/open/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Store Locations
    description: >-
      Manage warehouse / pickup origin addresses. Couriers pick up from these
      locations when a shipment is booked.
  - name: Providers
    description: Discover connected carriers and the services each carrier offers.
  - name: Coverage
    description: >-
      Look up the courier-specific province / city / district / sub-district
      dictionaries needed to populate addresses and quote fees.
  - name: Fee Calculation
    description: Quote shipping fees across carriers using one unified request shape.
  - name: Shipments
    description: >-
      Create, update, cancel, and track shipments. A shipment is always attached
      to an Order.
paths:
  /shipping/store-locations:
    post:
      tags:
        - Store Locations
      summary: Create store location
      description: >-
        Register a new pickup origin. Set `mainAddress: true` to make this the
        default; any previous main location will be unset automatically.


        For KiriminAja Express quoting you must also populate `districtId` and
        `subDistrictId` from `GET /shipping/coverage/districts` and `GET
        /shipping/coverage/sub-districts`.
      operationId: createStoreLocation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreLocationInput'
            examples:
              warehouseJakarta:
                summary: Jakarta warehouse with KiriminAja IDs
                value:
                  locationName: Main Warehouse — Jakarta
                  phoneNumber: '+6281234567890'
                  country: Indonesia
                  countryCode: ID
                  province: DKI Jakarta
                  city: Kota Jakarta Barat
                  district: Tambora
                  districtId: 2412
                  subDistrict: Tanah Sereal
                  subDistrictId: 33417
                  zip: '11210'
                  address1: Jl. KH. Moh. Mansyur No. 12
                  latitude: -6.1539
                  longitude: 106.8054
                  mainAddress: true
      responses:
        '201':
          description: Store location created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StoreLocation'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    StoreLocationInput:
      type: object
      required:
        - locationName
      properties:
        locationName:
          type: string
          maxLength: 255
        phoneNumber:
          type: string
        country:
          type: string
        countryCode:
          type: string
        province:
          type: string
        provinceCode:
          type: string
        city:
          type: string
        district:
          type: string
        districtId:
          type: integer
        subDistrict:
          type: string
        subDistrictId:
          type: integer
        zip:
          type: string
        address1:
          type: string
        address2:
          type: string
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
        mainAddress:
          type: boolean
    StoreLocation:
      type: object
      properties:
        id:
          type: string
        locationName:
          type: string
        phoneNumber:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        countryCode:
          type: string
          nullable: true
        province:
          type: string
          nullable: true
        provinceCode:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        district:
          type: string
          nullable: true
        districtId:
          type: integer
          nullable: true
          description: >-
            KiriminAja `kecamatan_id` — required when this location is used as
            origin for KA Express.
        subDistrict:
          type: string
          nullable: true
        subDistrictId:
          type: integer
          nullable: true
          description: KiriminAja `kelurahan_id`.
        zip:
          type: string
          nullable: true
        address1:
          type: string
          nullable: true
        address2:
          type: string
          nullable: true
        latitude:
          type: number
          format: double
          nullable: true
        longitude:
          type: number
          format: double
          nullable: true
        mainAddress:
          type: boolean
          description: Flagged as the company default pickup origin.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Machine-readable code, e.g. `VALIDATION_ERROR`, `NOT_FOUND`,
                `INTEGRATION_NOT_CONNECTED`, `PROVIDER_ERROR`, `BOOKING_FAILED`.
            message:
              type: string
              description: Human-readable error message.
  responses:
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: origin.districtId is required for KiriminAja Express
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Invalid API key
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Create one in Settings > Developer. The key
        must have the `BITCRM` product scope and an `orders` resource scope;
        required action depends on the endpoint (`READ`, `WRITE`, or `DELETE`).

````