# Fulfilment API

This is the API documentation for the Fulfilment API.

Version: 1.0.0

## Servers

Production
```
https://platform-api.quiqup.com
```

Staging
```
https://platform-api.staging.quiqup.com
```

## Security

### OAuth2

Type: oauth2

## Download OpenAPI description

[Fulfilment API](https://developer-docs.quiqup.com/_bundle/openapi.yaml)

## Fulfilment Inventory

### Get Inventory Batch

 - [GET /api/fulfilment/batches/{batchId}](https://developer-docs.quiqup.com/openapi/fulfilment-inventory/get:fulfilment_public_api.getinventorybatch.md): ## Get a Single Batch

### Description

This endpoint retrieves details for a single inventory batch by its unique batch ID.

### Use Cases

- Inspecting a specific batch for available and unusable quantities. - Verifying batch expiry and manufacturing dates.

### Get Inventory

 - [GET /api/fulfilment/inventory](https://developer-docs.quiqup.com/openapi/fulfilment-inventory/get:fulfilment_public_api.listinventory.md): ## 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.

### Adjust Stock

 - [POST /api/fulfilment/inventory/adjustments](https://developer-docs.quiqup.com/openapi/fulfilment-inventory/post:fulfilment_public_api.adjuststock.md): ## Adjust Stock for a Specific Bucket

### Description

This endpoint allows manual stock adjustments for a specific inventory bucket. The adjustment is applied as a delta (positive or negative) and recorded as an inventory movement.

### Use Cases

- Writing off damaged stock from the damaged bucket. - Correcting stock discrepancies after physical counts. - Moving stock to QC hold for quality inspection.

### Get Inventory By SKU

 - [GET /api/fulfilment/inventory/{sku}](https://developer-docs.quiqup.com/openapi/fulfilment-inventory/get:fulfilment_public_api.getinventorybysku.md): ## 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.

### List Inventory Batches

 - [GET /api/fulfilment/inventory/{sku}/batches](https://developer-docs.quiqup.com/openapi/fulfilment-inventory/get:fulfilment_public_api.listinventorybatches.md): ## List Batches for a Product

### Description

This endpoint retrieves batch-level inventory data for a specific product identified by its SKU. Each batch includes its batch number, expiry date, manufacturing date, and quantity breakdown.

### Use Cases

- Viewing batch-level stock breakdown for a batch-managed product. - Filtering batches by expiry date to identify stock expiring soon. - Looking up a specific batch by batch number.

## Fulfilment Inbound

### Book Inbound Delivery

 - [POST /api/fulfilment/inbound/book](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/post:fulfilment_public_api.bookinbound.md): ## 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

- 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

Note: The warehouse is automatically determined from your account's facility configuration.

### 📄 Optional Information

- Pickup Details: If collection is required from a supplier - Documents: Supporting files like invoices or manifests - Custom Labels: Human-readable slot identifiers

### Get Inbound Delivery

 - [GET /api/fulfilment/inbound/{id}](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/get:fulfilment_public_api.getinbound.md): ## 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

### Get Inbound State History

 - [GET /api/fulfilment/inbound/{id}/state-history](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/get:fulfilment_public_api.getinboundstatehistory.md): ## 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

### List Inbound Deliveries

 - [GET /api/fulfilment/inbounds](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/get:fulfilment_public_api.getinbounds.md): ## 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

### Update Inbound Delivery

 - [PATCH /api/fulfilment/inbounds/{id}](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/patch:fulfilment_public_api.updateinbound.md): ## Update an Existing Inbound Delivery

### Description

This endpoint allows you to update an existing inbound delivery with courier details, gate pass information, and/or schedule a PENDING inbound.

### Use Cases

- Adding courier/gate pass details (plate number, courier name, contact) to an inbound - Attaching documents such as emirates ID, vehicle registration, or gate passes - Scheduling a PENDING inbound by providing slot times and attendees

### Cancel Inbound Delivery

 - [POST /api/fulfilment/inbounds/{id}/cancel](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/post:fulfilment_public_api.cancelinbound.md): ## Cancel an Inbound Delivery

### Description

This endpoint allows you to cancel an inbound delivery that is in BOOKED or IN_PROGRESS status. Cancellation is a soft delete - the record remains in the database with status CANCELLED. The system handles cleanup of the WMS ASN, scheduling event, and facility notification.

### Use Cases

- Cancelling a delivery that is no longer needed - Rescheduling by cancelling and rebooking with new details

### Restrictions

- Only inbounds in BOOKED or IN_PROGRESS status can be cancelled - You can only cancel your own inbounds (unless you are an admin)

### Get Inbound Items

 - [GET /api/fulfilment/inbounds/{id}/items](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/get:fulfilment_public_api.getinbounditems.md): ## List GRN Line Items

### Description

This endpoint retrieves the line items (GRN details) for a specific inbound delivery. Each item includes SKU, quantities (expected, received, usable, unusable, quarantine), batch number, expiry date, and manufacturing date.

### Use Cases

- Reviewing received quantities against expected quantities. - Checking batch and expiry details for received goods. - Auditing GRN data for a specific inbound.

### Schedule Inbound Delivery

 - [POST /api/fulfilment/inbounds/{id}/schedule](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/post:fulfilment_public_api.scheduleinbound.md): ## Schedule a Pending Inbound Delivery

### Description

This endpoint allows you to schedule a previously unscheduled (PENDING) inbound delivery by providing slot times and attendees. The inbound will transition from PENDING to BOOKED and the full scheduling workflow (ASN creation, calendar booking, notifications) will be triggered.

### Use Cases

- Scheduling a delivery that was created without dates - Setting delivery times for a pending inbound after coordination with the warehouse

### Get Available Slots

 - [GET /api/fulfilment/slots/available](https://developer-docs.quiqup.com/openapi/fulfilment-inbound/get:fulfilment_public_api.getavailableslots.md): ## 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

## Fulfilment Orders

### Create Order

 - [POST /api/fulfilment/orders](https://developer-docs.quiqup.com/openapi/fulfilment-orders/post:fulfilment_public_api.createfulfilmentorder.md): ## 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).

### Get Order

 - [GET /api/fulfilment/orders/{id}](https://developer-docs.quiqup.com/openapi/fulfilment-orders/get:fulfilment_public_api.getfulfilmentorder.md): ## 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.

### Update Order

 - [PATCH /api/fulfilment/orders/{id}](https://developer-docs.quiqup.com/openapi/fulfilment-orders/patch:fulfilment_public_api.updatefulfilmentorder.md): ## 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.

## Fulfilment Products

### Create Product

 - [POST /api/fulfilment/products](https://developer-docs.quiqup.com/openapi/fulfilment-products/post:fulfilment_public_api.createproduct.md): ## 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.

### Bulk Commit Products

 - [POST /api/fulfilment/products/bulk/commit](https://developer-docs.quiqup.com/openapi/fulfilment-products/post:fulfilment_public_api.bulkcommitproducts.md): ## Commit a bulk product upload

Parses, validates, and creates/updates products from a CSV or XLSX file. Duplicates are either updated or skipped based on the update_duplicates form field.

Note: this operation is NOT atomic. Each row is processed individually, so a partial failure will leave some rows committed and others not. The per-row status in the response indicates exactly which rows succeeded or failed, allowing the caller to handle retries.

### Bulk Validate Products

 - [POST /api/fulfilment/products/bulk/validate](https://developer-docs.quiqup.com/openapi/fulfilment-products/post:fulfilment_public_api.bulkvalidateproducts.md): ## Validate a bulk product upload file

Parses a CSV or XLSX file and validates each row without persisting anything. Returns per-row validation status so the caller can preview before committing.

### Get Product

 - [GET /api/fulfilment/products/{sku}](https://developer-docs.quiqup.com/openapi/fulfilment-products/get:fulfilment_public_api.getproductbysku.md): ## 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.

### Update Product

 - [PATCH /api/fulfilment/products/{sku}](https://developer-docs.quiqup.com/openapi/fulfilment-products/patch:fulfilment_public_api.updateproduct.md): ## 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.

