components:
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  schemas:
    data.Coordinate:
      properties:
        latitude:
          title: |
            Geographic latitude
          type: number
        longitude:
          title: |
            Geographic longitude
          type: number
      required:
        - latitude
        - longitude
      type: object
    datatypes.JSONType_data.Dimensions:
      title: |
        JSONType give a generic data type for json encoded data.
      type: object
    pagination.PaginationMeta:
      properties:
        next:
          $ref: '#/components/schemas/pagination.PaginationRequest'
        next_url:
          type: string
        prev:
          $ref: '#/components/schemas/pagination.PaginationRequest'
        prev_url:
          type: string
        total:
          format: int64
          type: integer
      required:
        - total
      type: object
    pagination.PaginationRequest:
      properties:
        limit:
          format: int64
          type: integer
        page:
          format: int64
          type: integer
        sort:
          type: string
        sort_desc:
          type: boolean
      required:
        - limit
        - page
        - sort
        - sort_desc
      type: object
    types.AddressRequest:
      properties:
        address1:
          title: |
            Primary street address.
          type: string
        address2:
          title: |
            Additional address details (e.g., suite, apt number).
          type: string
        city:
          title: |
            City of the address.
          type: string
        coordinate:
          allOf:
            - $ref: '#/components/schemas/data.Coordinate'
          title: |
            Geographic coordinates.
        country:
          title: |
            Country name.
          type: string
        country_code:
          title: |
            ISO2 Country code (required).
          type: string
        email:
          title: |
            Email address associated with the address for contact.
          type: string
        first_name:
          title: |
            First name of the person associated with the address.
          type: string
        ksa_national_address:
          title: >
            National address code (e.g., Saudi Arabia's national address
            system).
          type: string
        last_name:
          title: |
            Last name of the person associated with the address.
          type: string
        name:
          title: |
            Full name used for addressing.
          type: string
        phone:
          title: |
            Phone number.
          type: string
        postcode:
          title: |
            Postal code (could be used instead of or in addition to zip).
          type: string
        state:
          title: |
            State, if applicable (could be similar to province).
          type: string
      required:
        - first_name
        - address1
        - city
        - country_code
        - email
        - phone
      type: object
    types.AvailableSlot:
      properties:
        end_time:
          format: date-time
          type: string
        start_time:
          format: date-time
          type: string
      required:
        - start_time
        - end_time
      title: >
        AvailableSlot represents a simplified time slot with only start and end
        times
      type: object
    types.Coordinate:
      properties:
        latitude:
          title: |
            Latitude of the location (between -90 and 90 degrees)
          type: number
        longitude:
          title: |
            Longitude of the location (between -180 and 180 degrees)
          type: number
      required:
        - latitude
        - longitude
      type: object
    types.CreateFulfilmentOrderAddressResponse:
      properties:
        address1:
          title: |
            Primary street address.
          type: string
        address2:
          title: |
            Additional address details (e.g., suite, apt number).
          type: string
        city:
          title: |
            City of the address.
          type: string
        coordinate:
          allOf:
            - $ref: '#/components/schemas/types.Coordinate'
          title: |
            Geographic coordinates.
        country:
          title: |
            Country name.
          type: string
        country_code:
          title: |
            ISO2 Country code (required).
          type: string
        created_at:
          format: date-time
          title: |
            Timestamp of when the address was created.
          type: string
        email:
          title: |
            Email address associated with the address for contact.
          type: string
        first_name:
          title: |
            First name of the person associated with the address.
          type: string
        ksa_national_address:
          title: >
            National address code (e.g., Saudi Arabia's national address
            system).
          type: string
        last_name:
          description: |
            Optional: Contact person's last name
          title: |
            Last name of the contact person
          type: string
        name:
          title: |
            Full name used for addressing.
          type: string
        phone:
          title: |
            Phone number.
          type: string
        postcode:
          title: |
            Postal code (could be used instead of or in addition to zip).
          type: string
        state:
          title: |
            State, if applicable (could be similar to province).
          type: string
        updated_at:
          format: date-time
          title: |
            Timestamp of when the address was last updated.
          type: string
      type: object
    types.Currency:
      enum:
        - AED
        - SAR
      type: string
    types.DeliveryOption:
      enum:
        - customer_identification_photo
      type: string
    types.Dimensions:
      properties:
        height:
          title: |
            Height of the item in specified unit
          type: number
        length:
          title: |
            Length of the item in specified unit
          type: number
        unit:
          title: |
            Unit of measurement (e.g., cm, m)
          type: string
        width:
          title: |
            Width of the item in specified unit
          type: number
      required:
        - height
        - width
        - length
        - unit
      type: object
    types.ExpiryGroup:
      properties:
        expiry_date:
          format: date-time
          title: |
            Date when the product batch expires
          type: string
        quantity:
          format: int64
          title: |
            Quantity of items in this expiry batch
          type: integer
      required:
        - expiry_date
        - quantity
      type: object
    types.Inbound:
      properties:
        asn_id:
          title: |
            ASN (Advance Shipment Notice) ID
          type: string
        attendees:
          items:
            type: string
          title: |
            List of people who will be present for the delivery
          type: array
        created_at:
          format: date-time
          title: |
            When the inbound was created
          type: string
        documents:
          items:
            $ref: '#/components/schemas/types.InboundDocument'
          title: |
            List of documents associated with the inbound
          type: array
        error_message:
          title: |
            Error message if the inbound encountered any issues
          type: string
        id:
          title: |
            Unique identifier for the inbound booking
          type: string
        items:
          items:
            $ref: '#/components/schemas/types.InboundItemResponse'
          title: |
            List of items in the inbound delivery
          type: array
        pickup_address:
          allOf:
            - $ref: '#/components/schemas/types.PickupAddress'
          title: |
            Pickup address if collection is required
        pickup_contact:
          allOf:
            - $ref: '#/components/schemas/types.PickupContact'
          title: |
            Pickup contact information if collection is required
        pickup_window:
          title: |
            Pickup time window (e.g., "9:00 AM - 12:00 PM")
          type: string
        requires_collection:
          title: |
            Whether this inbound requires collection from a pickup location
          type: boolean
        slot_end_at:
          format: date-time
          title: |
            Scheduled end time for the delivery slot
          type: string
        slot_start_at:
          format: date-time
          title: |
            Scheduled start time for the delivery slot
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/types.InboundStatus'
          title: |
            Current status of the inbound booking
        updated_at:
          format: date-time
          title: |
            When the inbound was last updated
          type: string
        warehouse_code:
          title: |
            Target warehouse code
          type: string
      required:
        - id
        - status
        - warehouse_code
        - created_at
        - updated_at
      title: |
        Inbound represents a single inbound delivery
      type: object
    types.InboundDocument:
      properties:
        document_type:
          description: |
            Required: Type of document being uploaded
          title: |
            Type of document
          type: string
        file_name:
          description: |
            Required: Original filename
          title: |
            Name of the file
          type: string
        file_size:
          description: |
            Optional: File size for validation
          format: int64
          title: |
            Size of the file in bytes
          type: integer
        file_url:
          description: |
            Required: Accessible URL to the document
          title: |
            URL where the document is stored
          type: string
        mime_type:
          description: |
            Optional: MIME type for proper handling
          title: |
            MIME type of the file
          type: string
      required:
        - document_type
        - file_name
        - file_url
      title: |
        InboundDocument represents a document related to the delivery
      type: object
    types.InboundItem:
      properties:
        batch_number:
          description: |
            Optional: For tracking specific batches
          title: |
            Batch number for the item
          type: string
        expiry_date:
          description: |
            Optional: For perishable items
          format: date-time
          title: |
            Expiry date of the item
          type: string
        manufacturing_date:
          description: |
            Optional: For tracking item age
          format: date-time
          title: |
            Manufacturing date of the item
          type: string
        quantity:
          description: |
            Required: Must be greater than 0
          format: int64
          title: |
            Quantity of the item being delivered
          type: integer
        sku:
          description: |
            Required: Must be a valid SKU
          title: |
            Stock Keeping Unit of the item
          type: string
        unit_price:
          description: |
            Required: For cost tracking purposes
          title: |
            Unit price of the item
          type: number
        uom:
          description: |
            Optional: Standard unit like "kg", "pieces", etc.
          title: |
            Unit of measurement for the item
          type: string
        uom_units:
          description: |
            Optional: How many units make up the UOM
          format: int64
          title: |
            Number of units in the UOM
          type: integer
      required:
        - sku
        - quantity
        - unit_price
      title: |
        InboundItem represents an item being delivered
      type: object
    types.InboundItemResponse:
      properties:
        batch_number:
          title: |
            Batch number for the item
          type: string
        created_at:
          format: date-time
          title: |
            When the item record was created
          type: string
        expiry_date:
          title: |
            Expiry date of the item
          type: string
        id:
          title: |
            Unique identifier for the item
          type: string
        manufacturing_date:
          title: |
            Manufacturing date of the item
          type: string
        quantity:
          format: int64
          title: |
            Expected quantity
          type: integer
        quarantine_quantity:
          format: int64
          title: |
            Quantity in quarantine for further inspection
          type: integer
        received_qty:
          format: int64
          title: |
            Actual received quantity
          type: integer
        sku:
          title: |
            Stock Keeping Unit of the item
          type: string
        unit_price:
          title: |
            Unit price of the item
          type: string
        unusable_quantity:
          format: int64
          title: |
            Unusable quantity (damaged, defective, etc.)
          type: integer
        uom:
          title: |
            Unit of measurement (e.g., "kg", "pieces")
          type: string
        uom_units:
          format: int64
          title: |
            Number of units in the UOM
          type: integer
        updated_at:
          format: date-time
          title: |
            When the item record was last updated
          type: string
        usable_quantity:
          format: int64
          title: |
            Usable quantity after quality control
          type: integer
      required:
        - sku
        - quantity
      title: |
        InboundItemResponse represents an item in an inbound delivery response
      type: object
    types.InboundState:
      title: |
        InboundState represents the current state of inbound inventory
      type: string
    types.InboundStateHistory:
      properties:
        changed_by:
          title: |
            Who or what triggered the change
          type: string
        created_at:
          format: date-time
          title: |
            When the state change occurred
          type: string
        id:
          title: |
            Unique identifier for the history record
          type: string
        inbound_id:
          title: |
            Inbound ID this history record belongs to
          type: string
        new_status:
          allOf:
            - $ref: '#/components/schemas/types.InboundStatus'
          title: |
            New status after the change
        old_status:
          allOf:
            - $ref: '#/components/schemas/types.InboundStatus'
          title: |
            Previous status before the change
        reason:
          title: |
            Reason for the state change
          type: string
        source:
          title: |
            Source of the state change (e.g., "webhook", "pull", "manual")
          type: string
        wms_status:
          title: |
            WMS status from the warehouse management system
          type: string
      required:
        - id
        - inbound_id
        - old_status
        - new_status
        - created_at
      title: >
        InboundStateHistory represents a historical record of inbound state
        changes
      type: object
    types.InboundStatus:
      title: |
        InboundStatus represents the status of an inbound booking
      type: string
    types.InventoryItem:
      properties:
        available:
          format: int64
          title: |
            Current available quantity
          type: integer
        cost:
          title: |
            Cost of the inventory item
          type: string
        created_at:
          format: date-time
          title: |
            Timestamp when the record was created
          type: string
        expiry_groups:
          items:
            $ref: '#/components/schemas/types.ExpiryGroup'
          title: |
            Groups of inventory by expiry date
          type: array
        inbound_state:
          allOf:
            - $ref: '#/components/schemas/types.InboundState'
          title: |
            Current inbound state
        product:
          allOf:
            - $ref: '#/components/schemas/types.Product'
          title: |
            Detailed product information
        product_id:
          title: |
            Reference to the associated product
          type: string
        tracked:
          title: |
            Whether inventory tracking is enabled
          type: boolean
        updated_at:
          format: date-time
          title: |
            Timestamp when the record was last updated
          type: string
      title: |
        InventoryItem represents an inventory item with detailed information.
      type: object
    types.OrderProduct:
      properties:
        quantity:
          description: |
            Required: Must be at least 1 Minimum value: 1
          format: int64
          title: |
            Quantity specifies the number of units to be delivered
          type: integer
        sku:
          description: >
            Required: Must be a valid SKU from your product catalog Maximum
            length: 100 characters
          title: |
            SKU (Stock Keeping Unit) uniquely identifies the product
          type: string
      required:
        - sku
        - quantity
      type: object
    types.OrderProductResponse:
      properties:
        country_of_origin:
          title: |
            ISO2 Country code where the product was manufactured
          type: string
        description:
          title: |
            Detailed description of the product
          type: string
        dimensions:
          allOf:
            - $ref: '#/components/schemas/types.Dimensions'
          title: |
            Physical dimensions of the product
        hs_code:
          title: |
            Harmonized System Code for customs classification
          type: string
        name:
          title: |
            Name of the product
          type: string
        quantity:
          format: int64
          title: |
            Number of units ordered
          type: integer
        selling_price:
          title: |
            Price at which the product is sold to customers
          type: number
        sku:
          title: |
            Stock Keeping Unit - unique identifier for the product
          type: string
        weight:
          title: |
            Weight of a single unit
          type: number
        weight_unit:
          title: |
            Unit of weight measurement (e.g., kg, g)
          type: string
      type: object
    types.OrderProductUpdate:
      description: |
        It includes additional fields that can be overridden during updates
      properties:
        country_of_origin:
          description: |
            Optional: If not provided, uses the value from the product catalog
          title: >
            CountryOfOrigin overrides the product's country of origin for this
            order
          type: string
        dimensions:
          allOf:
            - $ref: '#/components/schemas/types.RequestDimensions'
          description: |
            Optional: If not provided, uses the value from the product catalog
          title: |
            Dimensions overrides the product's dimensions for this order
        hs_code:
          description: |
            Optional: If not provided, uses the value from the product catalog
          title: |
            HSCode overrides the product's HS code for this order
          type: string
        quantity:
          description: |
            Required: Must be at least 1 Minimum value: 1
          format: int64
          title: |
            Quantity specifies the number of units to be delivered
          type: integer
        selling_price:
          description: |
            Optional: If not provided, uses the price from the product catalog
          title: |
            SellingPrice overrides the product's selling price for this order
          type: number
        sku:
          description: >
            Required: Must be a valid SKU from your product catalog Maximum
            length: 100 characters
          title: |
            SKU (Stock Keeping Unit) uniquely identifies the product
          type: string
        weight:
          description: |
            Optional: If not provided, uses the value from the product catalog
          title: |
            Weight overrides the product's weight for this order
          type: number
        weight_unit:
          description: |
            Optional: If not provided, uses the value from the product catalog
          title: |
            WeightUnit specifies the unit of measurement for weight
          type: string
      required:
        - sku
        - quantity
      title: |
        OrderProductUpdate is used for updating products in existing orders
      type: object
    types.OrderStatus:
      enum:
        - pending
        - ready_for_collection
        - picking_started
        - out_for_collection
        - out_for_return
        - at_depot
        - received_at_depot
        - in_transit
        - out_for_delivery
        - collection_failed
        - on_hold
        - scheduled
        - wms_on_hold
        - return_to_origin
        - returned_to_origin
        - cancelled
        - collected
        - delivery_complete
        - delivery_failed
        - problematic
      title: |
        OrderStatus represents the possible states of an order
      type: string
    types.ParcelResponse:
      properties:
        dimensions:
          allOf:
            - $ref: '#/components/schemas/types.Dimensions'
          title: |
            Physical dimensions of the parcel (length, width, height)
        id:
          title: |
            Unique identifier for the parcel
          type: string
        name:
          title: |
            Name or description of the parcel
          type: string
        notes:
          title: |
            Additional notes or handling instructions for the parcel
          type: string
        parcel_barcode:
          title: |
            Unique barcode assigned to the parcel for tracking
          type: string
        quantity:
          format: int64
          title: |
            Number of items in the parcel
          type: integer
        weight:
          title: |
            Weight of the parcel in kilograms
          type: number
      type: object
    types.PaymentMode:
      enum:
        - pre_paid
        - paid_on_delivery
      type: string
    types.PickupAddress:
      properties:
        address1:
          description: |
            Required: Full street address
          title: |
            Primary street address
          type: string
        address2:
          description: |
            Optional: Building, floor, suite, etc.
          title: |
            Secondary address details
          type: string
        city:
          description: |
            Required: City where pickup is located
          title: |
            City name
          type: string
        coordinate:
          allOf:
            - $ref: '#/components/schemas/types.Coordinate'
          description: |
            Optional: Latitude and longitude
          title: |
            Geographic coordinates
        country:
          description: |
            Required: Full country name
          title: |
            Country name
          type: string
        country_code:
          description: |
            Required: Two-letter country code
          title: |
            ISO2 country code
          type: string
        landmark:
          description: |
            Optional: Nearby landmark for easier identification
          title: |
            Landmark near the pickup location
          type: string
        name:
          description: |
            Required: Business name or location identifier
          title: |
            Name of the pickup location
          type: string
        postcode:
          description: |
            Optional: ZIP or postal code
          title: |
            Postal code
          type: string
        state:
          description: |
            Optional: State or province name
          title: |
            State or province
          type: string
      required:
        - name
        - address1
        - city
        - country
        - country_code
      title: |
        PickupAddress represents the pickup location for collection
      type: object
    types.PickupContact:
      properties:
        company:
          description: |
            Optional: Company the contact person works for
          title: |
            Company name
          type: string
        email:
          description: |
            Optional: Email for additional communication
          title: |
            Email address of the contact person
          type: string
        instructions:
          description: |
            Optional: Any special instructions for the pickup
          title: |
            Special instructions for pickup
          type: string
        name:
          description: |
            Required: Name of the person to contact
          title: |
            Full name of the contact person
          type: string
        phone:
          description: |
            Required: Must be in E.164 format
          title: |
            Phone number of the contact person
          type: string
      required:
        - name
        - phone
      title: |
        PickupContact represents the contact person for pickup
      type: object
    types.Product:
      properties:
        availability_status:
          format: int64
          title: |
            Current total available quantity of the product
          type: integer
        barcode:
          title: |
            Product barcode (EAN, UPC, ISBN, etc.)
          type: string
        cost_price:
          title: |
            Cost price of the product
          type: number
        country_code_of_origin:
          title: |
            ISO2 Country code of origin (required).
          type: string
        created_at:
          format: date-time
          title: |
            Creation timestamp
          type: string
        currency:
          allOf:
            - $ref: '#/components/schemas/types.Currency'
          title: |
            Currency of the product
        description:
          title: |
            Description of the product
          type: string
        dimensions:
          allOf:
            - $ref: '#/components/schemas/datatypes.JSONType_data.Dimensions'
          title: |
            Product dimensions
        harmonized_system_code:
          title: |
            Harmonized System Code (HS Code)
          type: string
        id:
          title: |
            Unique identifier for the product
          type: string
        image:
          title: |
            Images of the product
          type: string
        inventory_tracked:
          title: |
            If false means inventory can not be tracked/updated
          type: boolean
        name:
          title: |
            Name of the product
          type: string
        partner_product_id:
          title: |
            Partner's unique identifier for the product
          type: string
        platform_price:
          title: >
            Platform price for international orders (overrides sales channel
            price when

            enabled)
          type: number
        requires_shipping:
          title: >
            Indicates whether the product requires shipping services (virtual
            products do

            not require shipping)
          type: boolean
        retail_price:
          title: |
            Retail price of the product
          type: number
        selling_price:
          title: |
            Selling price of the product
          type: number
        sku:
          title: |
            Stock Keeping Unit
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/types.ProductStatus'
          title: |
            Product availability status
        total_sales:
          title: |
            Total lifetime sales quantity of this product
          type: number
        track_expiry:
          title: |
            Track expiry of the product, default to false
          type: boolean
        type:
          title: |
            Category of the product
          type: string
        updated_at:
          format: date-time
          title: |
            Last update timestamp
          type: string
        vendor:
          title: |
            Vendor or brand name
          type: string
        weight:
          title: |
            Weight of a single unit of the product
          type: number
        weight_unit:
          title: |
            Unit of weight measurement (kg or g)
          type: string
      type: object
    types.ProductStatus:
      enum:
        - active
        - archived
        - draft
      title: |
        Product API types
      type: string
    types.RequestDimensions:
      properties:
        height:
          title: |
            Height of the product in specified unit
          type: number
        length:
          title: |
            Length of the product in specified unit
          type: number
        unit:
          title: |
            Unit of measurement for dimensions (cm or m)
          type: string
        width:
          title: |
            Width of the product in specified unit
          type: number
      required:
        - length
        - width
        - height
        - unit
      type: object
    types.ServiceKind:
      enum:
        - partner_next_day
        - partner_same_day
        - partner_4hr
        - partner_export
        - partner_store
      title: |
        ServiceKind represents the type of delivery service
      type: string
  securitySchemes:
    OAuth2:
      flows:
        clientCredentials:
          scopes:
            public: Public API access
          tokenUrl: https://platform-api.quiqup.com/oauth/token
      type: oauth2
info:
  description: This is the API documentation for the Fulfilment API.
  title: Fulfilment API
  version: 1.0.0
openapi: 3.0.0
paths:
  /api/fulfilment/inbound/book:
    post:
      description: >
        ## Book an Inbound Delivery


        ### 📌 Description


        This endpoint allows you to **book an inbound delivery** to a warehouse.
        The system handles the complete lifecycle of inbound deliveries from
        booking to goods receipt.


        ### 🔹 Use Cases


        - **Scheduling warehouse deliveries** for inventory restocking -
        **Booking collection slots** for pickup from suppliers - **Managing
        inbound logistics** with proper documentation - **Tracking delivery
        status** through the fulfillment system


        ### 📋 Required Information


        - **Booking ID**: Unique identifier for the delivery booking (optional -
        auto-generated if not provided) - **Warehouse Code**: Target warehouse
        for the delivery - **Time Slot**: Start and end times for the delivery
        window - **Attendees**: List of people who will be present for the
        delivery - **Items**: List of products being delivered with quantities


        ### 📄 Optional Information


        - **Pickup Details**: If collection is required from a supplier -
        **Documents**: Supporting files like invoices or manifests - **Custom
        Labels**: Human-readable slot identifiers
      operationId: POST:fulfilment_public_api.BookInbound
      requestBody:
        content:
          application/json:
            schema:
              properties:
                attendees:
                  description: |
                    Required: At least one attendee must be specified
                  items:
                    type: string
                  title: |
                    List of attendees who will be present for the delivery
                  type: array
                documents:
                  description: >
                    Optional: Supporting documents like invoices, manifests,
                    etc.
                  items:
                    $ref: '#/components/schemas/types.InboundDocument'
                  title: |
                    List of documents related to the delivery
                  type: array
                items:
                  description: |
                    Required: At least one item must be specified
                  items:
                    $ref: '#/components/schemas/types.InboundItem'
                  title: |
                    List of items being delivered
                  type: array
                pickup_address:
                  $ref: '#/components/schemas/types.PickupAddress'
                pickup_contact:
                  $ref: '#/components/schemas/types.PickupContact'
                slot_end_at:
                  description: |
                    Required: Must be after slot\_start\_at
                  format: date-time
                  title: |
                    End time of the delivery slot
                  type: string
                slot_start_at:
                  description: |
                    Required: Must be a valid future timestamp
                  format: date-time
                  title: |
                    Start time of the delivery slot
                  type: string
                warehouse_code:
                  description: |
                    Required: Must be a valid warehouse code
                  title: |
                    Warehouse code where the delivery will be received
                  type: string
              required:
                - warehouse_code
                - slot_start_at
                - slot_end_at
                - attendees
                - items
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  asn_id:
                    description: |
                      Optional: Generated ASN ID for warehouse systems
                    title: |
                      ASN (Advance Shipment Notice) ID
                    type: string
                  inbound_id:
                    description: |
                      Generated by the system
                    title: |
                      Unique identifier for the inbound booking
                    type: string
                  status:
                    $ref: '#/components/schemas/types.InboundStatus'
                required:
                  - inbound_id
                  - status
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Book Inbound Delivery
      tags:
        - Fulfilment Inbound
  /api/fulfilment/inbound/{id}:
    get:
      description: >
        ## Get Single Inbound Delivery


        ### 📌 Description


        This endpoint retrieves a **specific inbound delivery** by its ID. You
        can view detailed delivery information and track individual delivery
        progress.


        ### 🔹 Use Cases


        - **Viewing specific delivery details** for detailed tracking -
        **Checking delivery status** for operational planning - **Accessing
        delivery documents** and supporting files - **Monitoring individual
        delivery progress**
      operationId: GET:fulfilment_public_api.GetInbound
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: id
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  inbound:
                    $ref: '#/components/schemas/types.Inbound'
                required:
                  - inbound
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Inbound Delivery
      tags:
        - Fulfilment Inbound
  /api/fulfilment/inbound/{id}/state-history:
    get:
      description: >
        ## Get Inbound State History


        ### 📌 Description


        This endpoint retrieves the **state change history** for a specific
        inbound delivery. The history tracks all status transitions from booking
        to completion.


        ### 🔹 Use Cases

          - **Tracking delivery progress** through different stages
          - **Auditing status changes** for compliance and reporting
          - **Debugging issues** by reviewing the state transition timeline
          - **Understanding delivery lifecycle** events
      operationId: GET:fulfilment_public_api.GetInboundStateHistory
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: id
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  history:
                    items:
                      $ref: '#/components/schemas/types.InboundStateHistory'
                    title: |
                      List of state history records for the inbound
                    type: array
                required:
                  - history
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Inbound State History
      tags:
        - Fulfilment Inbound
  /api/fulfilment/inbounds:
    get:
      description: >
        ## List All Inbound Deliveries


        ### 📌 Description


        This endpoint retrieves **all inbound deliveries** for the authenticated
        user. You can view delivery history and track multiple deliveries across
        different time slots.


        ### 🔹 Use Cases


        - **Viewing delivery history** for inventory management - **Tracking
        multiple deliveries** across different time slots - **Monitoring
        delivery status** for planning purposes - **Auditing inbound logistics**
        for reporting
      operationId: GET:fulfilment_public_api.GetInbounds
      parameters:
        - allowEmptyValue: true
          description: |
            Maximum number of items to return per page (1-100)
          explode: true
          in: query
          name: limit
          schema:
            format: int64
            type: integer
          style: form
        - allowEmptyValue: true
          description: |
            Page number to return (starts at 1)
          explode: true
          in: query
          name: page
          schema:
            format: int64
            type: integer
          style: form
        - allowEmptyValue: true
          description: |
            Field to sort results by
          explode: true
          in: query
          name: sort
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          description: |
            Sort in descending order if true
          explode: true
          in: query
          name: sort_desc
          schema:
            type: boolean
          style: form
        - allowEmptyValue: true
          description: |
            Filter by inbound status
          explode: true
          in: query
          name: state
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          description: |
            Filter by inbound IDs
          explode: true
          in: query
          name: ids
          schema:
            items:
              type: string
            type: array
          style: form
        - allowEmptyValue: true
          description: |
            Filter by WMS ASN ID
          explode: true
          in: query
          name: asn_id
          schema:
            type: string
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  inbounds:
                    items:
                      $ref: '#/components/schemas/types.Inbound'
                    title: |
                      List of inbound deliveries for the user
                    type: array
                  pagination:
                    $ref: '#/components/schemas/pagination.PaginationMeta'
                required:
                  - inbounds
                  - pagination
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        List Inbound Deliveries
      tags:
        - Fulfilment Inbound
  /api/fulfilment/inventory:
    get:
      description: >+
        ## List All Inventory


        ### 📌 Description


        This endpoint retrieves a **list of all inventory items** stored in the
        fulfilment centre under your account. Clients can **filter the results**
        using query parameters such as SKU or product ID.


        ### 🔹 Use Cases


        - **Checking stock levels** before placing new orders. 
         - **Filtering inventory** to track specific products. 
         - **Verifying stock availability** for customer fulfilment. 

      operationId: GET:fulfilment_public_api.ListInventory
      parameters:
        - allowEmptyValue: true
          description: |
            Maximum number of items to return per page (1-100)
          explode: true
          in: query
          name: limit
          schema:
            format: int64
            type: integer
          style: form
        - allowEmptyValue: true
          description: |
            Page number to return (starts at 1)
          explode: true
          in: query
          name: page
          schema:
            format: int64
            type: integer
          style: form
        - allowEmptyValue: true
          description: |
            Filter inventory by product SKU
          explode: true
          in: query
          name: sku
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          description: |
            Filter inventory by product name
          explode: true
          in: query
          name: product_name
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          description: |
            Field to sort results by
          explode: true
          in: query
          name: sort
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          description: |
            Sort in descending order if true
          explode: true
          in: query
          name: sort_desc
          schema:
            type: boolean
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  inventory:
                    items:
                      $ref: '#/components/schemas/types.InventoryItem'
                    title: |
                      Array of inventory items
                    type: array
                  pagination:
                    $ref: '#/components/schemas/pagination.PaginationMeta'
                required:
                  - inventory
                  - pagination
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Inventory
      tags:
        - Fulfilment Inventory
  /api/fulfilment/inventory/{sku}:
    get:
      description: >+
        ## Get Inventory for a Specific Product


        ### 📌 Description


        This endpoint retrieves **inventory details** for a specific product
        using its unique `productId`. The response includes **stock
        availability, storage location, and last update timestamp**.


        ### 🔹 Use Cases


        - **Checking real-time stock levels** for a specific product. 
         - **Verifying if a product is available** in a fulfilment centre. 
         - **Monitoring stock movements** to optimise replenishment. 

      operationId: GET:fulfilment_public_api.GetInventoryBySku
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: sku
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  available:
                    format: int64
                    title: |
                      Current available quantity in stock
                    type: integer
                  cost:
                    title: |
                      Cost of the inventory item
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Timestamp when the inventory record was created
                    type: string
                  expiry_groups:
                    items:
                      $ref: '#/components/schemas/types.ExpiryGroup'
                    title: |
                      Groups of inventory by expiry date
                    type: array
                  inbound_state:
                    $ref: '#/components/schemas/types.InboundState'
                  product:
                    $ref: '#/components/schemas/types.Product'
                  product_id:
                    title: |
                      Reference to the associated product
                    type: string
                  tracked:
                    title: |
                      Whether inventory tracking is enabled for this item
                    type: boolean
                  updated_at:
                    format: date-time
                    title: |
                      Timestamp when the inventory record was last updated
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Inventory By SKU
      tags:
        - Fulfilment Inventory
  /api/fulfilment/orders:
    post:
      description: >+
        ## Create a Fulfilment Order


        ### 📌 Description


        This endpoint allows you to create a **fulfilment order**. The
        `service_kind` field determines the **picking & packing SLA** based on
        your account's cut-off times and automatically selects the appropriate
        **delivery service** with the carrier.


        ### Available Service Kinds:


        - **partner_next_day** → Next-day delivery (standard service), available
        in **UAE & KSA**. 
         - **partner_same_day** → Same-day delivery, currently **only available in the UAE**. 
         - **partner_4hr** → 4-hour deliveries, **only available in Dubai**. 
         - **partner_export** → International shipments, **carrier allocation is rule-based**. 


        Additionally, return orders can be created by setting `is_return` to
        `true`.


        ### 🔹 Use Cases


        - **Creating a new customer order** for fulfilment. 
         - **Processing a return order** by setting `is_return: true`. 
         - **Handling multi-item orders** with various delivery options. 
         - **Managing payment-on-delivery orders** (`payment_mode: paid_on_delivery`). 

      operationId: POST:fulfilment_public_api.CreateFulfilmentOrder
      requestBody:
        content:
          application/json:
            schema:
              properties:
                billing_address:
                  $ref: '#/components/schemas/types.AddressRequest'
                billing_identifier:
                  description: |
                    Optional: Used for internal billing reference
                  title: >
                    BillingIdentifier is a custom identifier for billing
                    purposes
                  type: string
                carrier:
                  description: >
                    Optional: Used to specify which carrier should handle the
                    delivery
                  title: |
                    Carrier specifies the delivery carrier for the order
                  type: string
                currency:
                  title: >
                    Currency is the 3-letter ISO currency code for the order
                    (e.g., AED)
                  type: string
                delivery_options:
                  description: |
                    Optional: Array of special delivery requirements
                  items:
                    $ref: '#/components/schemas/types.DeliveryOption'
                  title: |
                    DeliveryOptions specifies special delivery instructions
                  type: array
                incoterm:
                  description: >
                    Optional: Used for international shipments to define
                    delivery terms
                  title: >
                    Incoterm specifies the international commercial terms for
                    the order
                  type: string
                initial_order_id:
                  description: >
                    Required only for return orders, references the original
                    order
                  title: |
                    InitialOrderID is required when IsReturn is true
                  type: string
                is_return:
                  description: |
                    Optional: Set to true for return deliveries
                  title: |
                    IsReturn indicates if this is a return order
                  type: boolean
                notes:
                  description: |
                    Optional: Maximum 255 characters
                  title: |
                    Notes contains any additional delivery instructions
                  type: string
                origin_address:
                  $ref: '#/components/schemas/types.AddressRequest'
                partner_order_id:
                  description: |
                    Required: Must be unique across all orders
                  title: |
                    PartnerOrderID is your unique reference for the order
                  type: string
                payment_amount:
                  title: >
                    PaymentAmount is the total amount to be collected from the
                    customer
                  type: number
                payment_mode:
                  $ref: '#/components/schemas/types.PaymentMode'
                products:
                  items:
                    $ref: '#/components/schemas/types.OrderProduct'
                  title: |
                    Products is an array of products to be delivered
                  type: array
                service_kind:
                  $ref: '#/components/schemas/types.ServiceKind'
                shipping_address:
                  $ref: '#/components/schemas/types.AddressRequest'
              required:
                - service_kind
                - currency
                - payment_amount
                - shipping_address
                - origin_address
                - partner_order_id
                - payment_mode
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  billing_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  carrier:
                    title: |
                      Delivery carrier for the order
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Timestamp when the order was created
                    type: string
                  currency:
                    title: |
                      3-letter ISO currency code (e.g., AED, SAR)
                    type: string
                  delivery_options:
                    description: >
                      Possible values: leave\_at\_door,
                      customer\_identification\_photo
                    items:
                      $ref: '#/components/schemas/types.DeliveryOption'
                    title: |
                      Special delivery requirements
                    type: array
                  errors:
                    items:
                      additionalProperties:
                        type: string
                      type: object
                    title: |
                      Array of error messages if any issues occurred
                    type: array
                  id:
                    title: |
                      Unique identifier for the fulfilment order
                    type: string
                  incoterm:
                    title: |
                      International commercial terms for the order
                    type: string
                  initial_order_id:
                    title: |
                      Reference to the original order ID for returns
                    type: string
                  is_return:
                    title: |
                      Indicates if this is a return order
                    type: boolean
                  notes:
                    title: |
                      Additional delivery instructions or comments
                    type: string
                  origin_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  parcels:
                    items:
                      $ref: '#/components/schemas/types.ParcelResponse'
                    title: |
                      List of parcels associated with the order
                    type: array
                  partner_order_id:
                    title: |
                      Your unique reference for the order
                    type: string
                  payment_amount:
                    title: |
                      Total amount to be collected from the customer
                    type: number
                  payment_mode:
                    $ref: '#/components/schemas/types.PaymentMode'
                  picking_order_created:
                    title: |
                      Indicates if a picking order has been created
                    type: boolean
                  products:
                    items:
                      $ref: '#/components/schemas/types.OrderProductResponse'
                    title: |
                      List of products included in the order
                    type: array
                  service_kind:
                    description: >
                      Possible values: partner\_next\_day, partner\_same\_day,
                      partner\_4hr, partner\_export, partner\_store
                    title: |
                      Type of delivery service requested
                    type: string
                  shipping_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  status:
                    $ref: '#/components/schemas/types.OrderStatus'
                  status_reason:
                    title: >
                      Reason for the current status (e.g., why an order was
                      cancelled)
                    type: string
                  tracking_url:
                    title: |
                      URL for basic order tracking
                    type: string
                  tracking_url_advance:
                    title: |
                      URL for advanced order tracking with more details
                    type: string
                  updated_at:
                    format: date-time
                    title: |
                      Timestamp when the order was last updated
                    type: string
                  uuid:
                    title: |
                      UUID of the fulfilment order
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Create Order
      tags:
        - Fulfilment Orders
  /api/fulfilment/orders/{id}:
    get:
      description: >+
        ## Get a Fulfilment Order by ID


        ### 📌 Description


        This endpoint retrieves the details of an **existing fulfilment order**
        using its unique ID.


        ### 🔹 Use Cases


        - **Checking the status** of a previously created fulfilment order. 
         - **Retrieving tracking details** to share with customers. 
         - **Confirming order information** before dispatch or customer communication. 
         - **Verifying payment and service type** for an order.  

      operationId: GET:fulfilment_public_api.GetFulfilmentOrder
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: id
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  billing_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  carrier:
                    title: |
                      Delivery carrier for the order
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Timestamp when the order was created
                    type: string
                  currency:
                    title: |
                      3-letter ISO currency code (e.g., AED, SAR)
                    type: string
                  delivery_options:
                    description: >
                      Possible values: leave\_at\_door,
                      customer\_identification\_photo
                    items:
                      $ref: '#/components/schemas/types.DeliveryOption'
                    title: |
                      Special delivery requirements
                    type: array
                  errors:
                    items:
                      additionalProperties:
                        type: string
                      type: object
                    title: |
                      Array of error messages if any issues occurred
                    type: array
                  id:
                    title: |
                      Unique identifier for the fulfilment order
                    type: string
                  incoterm:
                    title: |
                      International commercial terms for the order
                    type: string
                  initial_order_id:
                    title: |
                      Reference to the original order ID for returns
                    type: string
                  is_return:
                    title: |
                      Indicates if this is a return order
                    type: boolean
                  notes:
                    title: |
                      Additional delivery instructions or comments
                    type: string
                  origin_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  parcels:
                    items:
                      $ref: '#/components/schemas/types.ParcelResponse'
                    title: |
                      List of parcels associated with the order
                    type: array
                  partner_order_id:
                    title: |
                      Your unique reference for the order
                    type: string
                  payment_amount:
                    title: |
                      Total amount to be collected from the customer
                    type: number
                  payment_mode:
                    $ref: '#/components/schemas/types.PaymentMode'
                  picking_order_created:
                    title: |
                      Indicates if a picking order has been created
                    type: boolean
                  products:
                    items:
                      $ref: '#/components/schemas/types.OrderProductResponse'
                    title: |
                      List of products included in the order
                    type: array
                  service_kind:
                    description: >
                      Possible values: partner\_next\_day, partner\_same\_day,
                      partner\_4hr, partner\_export, partner\_store
                    title: |
                      Type of delivery service requested
                    type: string
                  shipping_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  status:
                    $ref: '#/components/schemas/types.OrderStatus'
                  status_reason:
                    title: >
                      Reason for the current status (e.g., why an order was
                      cancelled)
                    type: string
                  tracking_url:
                    title: |
                      URL for basic order tracking
                    type: string
                  tracking_url_advance:
                    title: |
                      URL for advanced order tracking with more details
                    type: string
                  updated_at:
                    format: date-time
                    title: |
                      Timestamp when the order was last updated
                    type: string
                  uuid:
                    title: |
                      UUID of the fulfilment order
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Order
      tags:
        - Fulfilment Orders
    patch:
      description: >+
        ## Update a Fulfilment Order


        ### 📌 Description


        This endpoint allows you to **update an existing fulfilment order**.
        Depending on the current order status, some fields **may not be
        modifiable**.


        For example:


        - If the order is already **out for delivery**, the shipping address
        **cannot be changed**. 
         - If the order has been **picked and packed**, modifications to products are no longer possible. 
         - Orders that are **cancelled or completed** cannot be updated. 


        ### 🔹 Use Cases


        - **Updating the shipping address** before the order is dispatched. 
         - **Modifying payment details** before dispatched. 
         - **Adjusting product quantities** before fulfilment begins. 
         - **Cancelling an order** if it has not yet been picked and packed. 

      operationId: PATCH:fulfilment_public_api.UpdateFulfilmentOrder
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: id
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                billing_address:
                  $ref: '#/components/schemas/types.AddressRequest'
                carrier:
                  description: >
                    Optional: Used to specify which carrier should handle the
                    delivery
                  title: |
                    Carrier updates the delivery carrier for the order
                  type: string
                incoterm:
                  description: >
                    Optional: Used for international shipments to define
                    delivery terms
                  title: >
                    Incoterm updates the international commercial terms for the
                    order
                  type: string
                origin_address:
                  $ref: '#/components/schemas/types.AddressRequest'
                payment_amount:
                  title: |
                    PaymentAmount updates the amount to be collected
                  type: number
                payment_mode:
                  $ref: '#/components/schemas/types.PaymentMode'
                products:
                  description: >
                    For updates, products can include additional fields to
                    override catalog values
                  items:
                    $ref: '#/components/schemas/types.OrderProductUpdate'
                  title: |
                    Products updates the list of products to be delivered
                  type: array
                service_kind:
                  $ref: '#/components/schemas/types.ServiceKind'
                shipping_address:
                  $ref: '#/components/schemas/types.AddressRequest'
                status:
                  title: |
                    Status updates the current status of the order
                  type: string
              required:
                - status
                - service_kind
                - products
                - shipping_address
                - billing_address
                - origin_address
                - payment_amount
                - payment_mode
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  billing_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  carrier:
                    title: |
                      Delivery carrier for the order
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Timestamp when the order was created
                    type: string
                  currency:
                    title: |
                      3-letter ISO currency code (e.g., AED, SAR)
                    type: string
                  delivery_options:
                    description: >
                      Possible values: leave\_at\_door,
                      customer\_identification\_photo
                    items:
                      $ref: '#/components/schemas/types.DeliveryOption'
                    title: |
                      Special delivery requirements
                    type: array
                  errors:
                    items:
                      additionalProperties:
                        type: string
                      type: object
                    title: |
                      Array of error messages if any issues occurred
                    type: array
                  id:
                    title: |
                      Unique identifier for the fulfilment order
                    type: string
                  incoterm:
                    title: |
                      International commercial terms for the order
                    type: string
                  initial_order_id:
                    title: |
                      Reference to the original order ID for returns
                    type: string
                  is_return:
                    title: |
                      Indicates if this is a return order
                    type: boolean
                  notes:
                    title: |
                      Additional delivery instructions or comments
                    type: string
                  origin_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  parcels:
                    items:
                      $ref: '#/components/schemas/types.ParcelResponse'
                    title: |
                      List of parcels associated with the order
                    type: array
                  partner_order_id:
                    title: |
                      Your unique reference for the order
                    type: string
                  payment_amount:
                    title: |
                      Total amount to be collected from the customer
                    type: number
                  payment_mode:
                    $ref: '#/components/schemas/types.PaymentMode'
                  picking_order_created:
                    title: |
                      Indicates if a picking order has been created
                    type: boolean
                  products:
                    items:
                      $ref: '#/components/schemas/types.OrderProductResponse'
                    title: |
                      List of products included in the order
                    type: array
                  service_kind:
                    description: >
                      Possible values: partner\_next\_day, partner\_same\_day,
                      partner\_4hr, partner\_export, partner\_store
                    title: |
                      Type of delivery service requested
                    type: string
                  shipping_address:
                    $ref: >-
                      #/components/schemas/types.CreateFulfilmentOrderAddressResponse
                  status:
                    $ref: '#/components/schemas/types.OrderStatus'
                  status_reason:
                    title: >
                      Reason for the current status (e.g., why an order was
                      cancelled)
                    type: string
                  tracking_url:
                    title: |
                      URL for basic order tracking
                    type: string
                  tracking_url_advance:
                    title: |
                      URL for advanced order tracking with more details
                    type: string
                  updated_at:
                    format: date-time
                    title: |
                      Timestamp when the order was last updated
                    type: string
                  uuid:
                    title: |
                      UUID of the fulfilment order
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Update Order
      tags:
        - Fulfilment Orders
  /api/fulfilment/products:
    post:
      description: >+
        ## Create a Product


        ### 📌 Description


        This endpoint allows you to **create a new product** in the fulfilment
        system. Each product must have a **unique SKU**, and essential details
        such as **pricing, inventory tracking settings, and dimensions** must be
        provided.


        ### 🔹 Use Cases


        - **Adding a new product** to the fulfilment system. 
         - **Defining product pricing and inventory tracking settings**. 
         - **Configuring product dimensions** for warehouse storage and shipping calculations. 

      operationId: POST:fulfilment_public_api.CreateProduct
      requestBody:
        content:
          application/json:
            schema:
              properties:
                availability_status:
                  format: int64
                  title: >
                    Current availability status of the product (1: available, 0:
                    unavailable)
                  type: integer
                barcode:
                  title: |
                    Product barcode (EAN, UPC, ISBN, etc.)
                  type: string
                cost_price:
                  title: |
                    Cost of acquiring/manufacturing the product
                  type: number
                country_code_of_origin:
                  title: |
                    ISO2 Country code where product was manufactured
                  type: string
                currency:
                  $ref: '#/components/schemas/types.Currency'
                description:
                  title: |
                    Detailed description of the product
                  type: string
                dimensions:
                  $ref: '#/components/schemas/types.RequestDimensions'
                harmonized_system_code:
                  title: |
                    Harmonized System Code for customs
                  type: string
                image:
                  title: |
                    URL of the product image
                  type: string
                inventory_tracked:
                  title: |
                    Whether inventory levels are tracked
                  type: boolean
                name:
                  title: |
                    Name of the product
                  type: string
                partner_product_id:
                  title: |
                    Partner's unique identifier for the product
                  type: string
                platform_price:
                  title: >
                    Platform price for international orders (overrides sales
                    channel price when

                    enabled)
                  type: number
                requires_shipping:
                  title: |
                    Indicates whether the product requires shipping services
                  type: boolean
                retail_price:
                  title: |
                    Recommended retail price
                  type: number
                selling_price:
                  title: |
                    Price at which the product is sold to customers
                  type: number
                sku:
                  title: |
                    Unique Stock Keeping Unit identifier
                  type: string
                status:
                  $ref: '#/components/schemas/types.ProductStatus'
                total_sales:
                  title: |
                    Total lifetime sales quantity of this product
                  type: number
                track_expiry:
                  title: |
                    Whether to track expiry dates for this product
                  type: boolean
                type:
                  title: |
                    Type of product (e.g. physical, digital)
                  type: string
                vendor:
                  title: |
                    Name of the product vendor/manufacturer
                  type: string
                weight:
                  title: |
                    Weight of a single unit of the product
                  type: number
                weight_unit:
                  title: |
                    Unit of weight measurement (kg or g)
                  type: string
              required:
                - selling_price
                - currency
                - sku
                - availability_status
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  availability_status:
                    format: int64
                    title: |
                      Current total available quantity of the product
                    type: integer
                  barcode:
                    title: |
                      Product barcode (EAN, UPC, ISBN, etc.)
                    type: string
                  cost_price:
                    title: |
                      Cost price of the product
                    type: number
                  country_code_of_origin:
                    title: |
                      ISO2 Country code of origin (required).
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Creation timestamp
                    type: string
                  currency:
                    $ref: '#/components/schemas/types.Currency'
                  description:
                    title: |
                      Description of the product
                    type: string
                  dimensions:
                    $ref: '#/components/schemas/datatypes.JSONType_data.Dimensions'
                  harmonized_system_code:
                    title: |
                      Harmonized System Code (HS Code)
                    type: string
                  id:
                    title: |
                      Unique identifier for the product
                    type: string
                  image:
                    title: |
                      Images of the product
                    type: string
                  inventory_tracked:
                    title: |
                      If false means inventory can not be tracked/updated
                    type: boolean
                  name:
                    title: |
                      Name of the product
                    type: string
                  partner_product_id:
                    title: |
                      Partner's unique identifier for the product
                    type: string
                  platform_price:
                    title: >
                      Platform price for international orders (overrides sales
                      channel price when

                      enabled)
                    type: number
                  requires_shipping:
                    title: >
                      Indicates whether the product requires shipping services
                      (virtual products do

                      not require shipping)
                    type: boolean
                  retail_price:
                    title: |
                      Retail price of the product
                    type: number
                  selling_price:
                    title: |
                      Selling price of the product
                    type: number
                  sku:
                    title: |
                      Stock Keeping Unit
                    type: string
                  status:
                    $ref: '#/components/schemas/types.ProductStatus'
                  total_sales:
                    title: |
                      Total lifetime sales quantity of this product
                    type: number
                  track_expiry:
                    title: |
                      Track expiry of the product, default to false
                    type: boolean
                  type:
                    title: |
                      Category of the product
                    type: string
                  updated_at:
                    format: date-time
                    title: |
                      Last update timestamp
                    type: string
                  vendor:
                    title: |
                      Vendor or brand name
                    type: string
                  weight:
                    title: |
                      Weight of a single unit of the product
                    type: number
                  weight_unit:
                    title: |
                      Unit of weight measurement (kg or g)
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Create Product
      tags:
        - Fulfilment Products
  /api/fulfilment/products/{sku}:
    get:
      description: >
        ## Get a Product by SKU


        ### 📌 Description


        This endpoint retrieves **detailed information** about a specific
        product using its unique `sku`. The response includes **product
        metadata, pricing, inventory tracking status, and fulfilment-related
        details**.


        ### 🔹 Use Cases


        - **Fetching product details** to confirm SKU, pricing, and inventory
        settings. 
         - **Displaying product information** in an eCommerce system or inventory dashboard. 
         - **Ensuring a product is active and available** before placing a fulfilment order. 


        ### 🔹 Parameters


        - `id`: The unique id or sku of the product.
      operationId: GET:fulfilment_public_api.GetProductBySKU
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: sku
          required: true
          schema:
            type: string
          style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  availability_status:
                    format: int64
                    title: |
                      Current total available quantity of the product
                    type: integer
                  barcode:
                    title: |
                      Product barcode (EAN, UPC, ISBN, etc.)
                    type: string
                  cost_price:
                    title: |
                      Cost price of the product
                    type: number
                  country_code_of_origin:
                    title: |
                      ISO2 Country code of origin (required).
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Creation timestamp
                    type: string
                  currency:
                    $ref: '#/components/schemas/types.Currency'
                  description:
                    title: |
                      Description of the product
                    type: string
                  dimensions:
                    $ref: '#/components/schemas/datatypes.JSONType_data.Dimensions'
                  harmonized_system_code:
                    title: |
                      Harmonized System Code (HS Code)
                    type: string
                  id:
                    title: |
                      Unique identifier for the product
                    type: string
                  image:
                    title: |
                      Images of the product
                    type: string
                  inventory_tracked:
                    title: |
                      If false means inventory can not be tracked/updated
                    type: boolean
                  name:
                    title: |
                      Name of the product
                    type: string
                  partner_product_id:
                    title: |
                      Partner's unique identifier for the product
                    type: string
                  platform_price:
                    title: >
                      Platform price for international orders (overrides sales
                      channel price when

                      enabled)
                    type: number
                  requires_shipping:
                    title: >
                      Indicates whether the product requires shipping services
                      (virtual products do

                      not require shipping)
                    type: boolean
                  retail_price:
                    title: |
                      Retail price of the product
                    type: number
                  selling_price:
                    title: |
                      Selling price of the product
                    type: number
                  sku:
                    title: |
                      Stock Keeping Unit
                    type: string
                  status:
                    $ref: '#/components/schemas/types.ProductStatus'
                  total_sales:
                    title: |
                      Total lifetime sales quantity of this product
                    type: number
                  track_expiry:
                    title: |
                      Track expiry of the product, default to false
                    type: boolean
                  type:
                    title: |
                      Category of the product
                    type: string
                  updated_at:
                    format: date-time
                    title: |
                      Last update timestamp
                    type: string
                  vendor:
                    title: |
                      Vendor or brand name
                    type: string
                  weight:
                    title: |
                      Weight of a single unit of the product
                    type: number
                  weight_unit:
                    title: |
                      Unit of weight measurement (kg or g)
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Product
      tags:
        - Fulfilment Products
    patch:
      description: >+
        ## Update a Product


        ### 📌 Description


        This endpoint allows you to **partially update an existing product**.
        Unlike `POST`, which is used to create new products, `PATCH` **only
        modifies specified fields** of an existing product.


        ### 🔹 Use Cases


        - **Updating product pricing** without affecting other attributes. 
         - **Changing product status** (e.g., from `active` to `archived`). 
         - **Modifying SKU or barcode** while keeping other details intact. 

      operationId: PATCH:fulfilment_public_api.UpdateProduct
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: sku
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                availability_status:
                  format: int64
                  title: >
                    Current availability status of the product (1: available, 0:
                    unavailable)
                  type: integer
                barcode:
                  title: |
                    Product barcode (EAN, UPC, ISBN, etc.)
                  type: string
                cost_price:
                  title: |
                    Cost of acquiring/manufacturing the product
                  type: number
                country_code_of_origin:
                  title: |
                    ISO2 Country code where product was manufactured
                  type: string
                currency:
                  $ref: '#/components/schemas/types.Currency'
                description:
                  title: |
                    Detailed description of the product
                  type: string
                dimensions:
                  $ref: '#/components/schemas/types.RequestDimensions'
                harmonized_system_code:
                  title: |
                    Harmonized System Code for customs
                  type: string
                image:
                  title: |
                    URL of the product image
                  type: string
                inventory_tracked:
                  title: |
                    Whether inventory levels are tracked
                  type: boolean
                name:
                  title: |
                    Name of the product
                  type: string
                partner_product_id:
                  title: |
                    Partner's unique identifier for the product
                  type: string
                platform_price:
                  title: >
                    Platform price for international orders (overrides sales
                    channel price when

                    enabled)
                  type: number
                requires_shipping:
                  title: |
                    Indicates whether the product requires shipping services
                  type: boolean
                retail_price:
                  title: |
                    Recommended retail price
                  type: number
                selling_price:
                  title: |
                    Price at which the product is sold to customers
                  type: number
                sku:
                  title: |
                    Unique Stock Keeping Unit identifier
                  type: string
                status:
                  $ref: '#/components/schemas/types.ProductStatus'
                total_sales:
                  title: |
                    Total lifetime sales quantity of this product
                  type: number
                track_expiry:
                  title: |
                    Whether to track expiry dates for this product
                  type: boolean
                type:
                  title: |
                    Type of product (e.g. physical, digital)
                  type: string
                vendor:
                  title: |
                    Name of the product vendor/manufacturer
                  type: string
                weight:
                  title: |
                    Weight of a single unit of the product
                  type: number
                weight_unit:
                  title: |
                    Unit of weight measurement (kg or g)
                  type: string
              required:
                - selling_price
                - currency
                - sku
                - availability_status
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  availability_status:
                    format: int64
                    title: |
                      Current total available quantity of the product
                    type: integer
                  barcode:
                    title: |
                      Product barcode (EAN, UPC, ISBN, etc.)
                    type: string
                  cost_price:
                    title: |
                      Cost price of the product
                    type: number
                  country_code_of_origin:
                    title: |
                      ISO2 Country code of origin (required).
                    type: string
                  created_at:
                    format: date-time
                    title: |
                      Creation timestamp
                    type: string
                  currency:
                    $ref: '#/components/schemas/types.Currency'
                  description:
                    title: |
                      Description of the product
                    type: string
                  dimensions:
                    $ref: '#/components/schemas/datatypes.JSONType_data.Dimensions'
                  harmonized_system_code:
                    title: |
                      Harmonized System Code (HS Code)
                    type: string
                  id:
                    title: |
                      Unique identifier for the product
                    type: string
                  image:
                    title: |
                      Images of the product
                    type: string
                  inventory_tracked:
                    title: |
                      If false means inventory can not be tracked/updated
                    type: boolean
                  name:
                    title: |
                      Name of the product
                    type: string
                  partner_product_id:
                    title: |
                      Partner's unique identifier for the product
                    type: string
                  platform_price:
                    title: >
                      Platform price for international orders (overrides sales
                      channel price when

                      enabled)
                    type: number
                  requires_shipping:
                    title: >
                      Indicates whether the product requires shipping services
                      (virtual products do

                      not require shipping)
                    type: boolean
                  retail_price:
                    title: |
                      Retail price of the product
                    type: number
                  selling_price:
                    title: |
                      Selling price of the product
                    type: number
                  sku:
                    title: |
                      Stock Keeping Unit
                    type: string
                  status:
                    $ref: '#/components/schemas/types.ProductStatus'
                  total_sales:
                    title: |
                      Total lifetime sales quantity of this product
                    type: number
                  track_expiry:
                    title: |
                      Track expiry of the product, default to false
                    type: boolean
                  type:
                    title: |
                      Category of the product
                    type: string
                  updated_at:
                    format: date-time
                    title: |
                      Last update timestamp
                    type: string
                  vendor:
                    title: |
                      Vendor or brand name
                    type: string
                  weight:
                    title: |
                      Weight of a single unit of the product
                    type: number
                  weight_unit:
                    title: |
                      Unit of weight measurement (kg or g)
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Update Product
      tags:
        - Fulfilment Products
  /api/fulfilment/slots/available:
    get:
      description: >
        ## Get Available Time Slots


        ### 📌 Description


        This endpoint retrieves **available time slots** for inbound deliveries
        at a specific warehouse. You can specify a time range to get all
        available slots within that period.


        ### 🔹 Use Cases


        - **Checking available delivery slots** before booking an inbound -
        **Planning delivery schedules** for inventory restocking - **Finding
        suitable time windows** for warehouse deliveries - **Optimizing delivery
        planning** based on availability
      operationId: GET:fulfilment_public_api.GetAvailableSlots
      parameters:
        - allowEmptyValue: true
          explode: true
          in: query
          name: warehouse_code
          required: true
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          explode: true
          in: query
          name: start_time
          required: true
          schema:
            format: date-time
            type: string
          style: form
        - allowEmptyValue: true
          explode: true
          in: query
          name: end_time
          required: true
          schema:
            format: date-time
            type: string
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  slots:
                    items:
                      $ref: '#/components/schemas/types.AvailableSlot'
                    type: array
                required:
                  - slots
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: |
        Get Available Slots
      tags:
        - Fulfilment Inbound
security:
  - OAuth2: []
servers:
  - description: Production
    url: https://platform-api.quiqup.com
  - description: Staging
    url: https://platform-api.staging.quiqup.com
