Create fulfillments for fulfillment order
POST
/merchants/{merchantCode}/fulfillmentOrders/{orderNumber}/fulfillments
const url = 'https://order.shopgate.io/v1/merchants/example/fulfillmentOrders/example/fulfillments?createShippingLabels=true';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"fulfillments":[{"status":"open","carrier":"DHL","serviceLevel":"sameDay","tracking":"JJD000390007882823450","fulfillmentPackages":[{"status":"open","serviceLevel":"sameDay","package":"small","fulfilledFromLocationCode":"DERetail001","weight":2000,"weightUnit":"g","dimensions":{"length":25,"lengthUnit":"mm","width":17.5,"widthUnit":"mm","height":10,"heightUnit":"mm"},"tracking":"JJD000390007882823450","pickUpBy":"Kim Muster","labelUrl":"https://documentserver.internal/label/label.pdf","labelType":"pdf","fulfillmentDate":"2026-04-15T12:00:00Z","packageItems":[{"salesOrderLineItemCode":"386","quantity":1}]}]}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://order.shopgate.io/v1/merchants/example/fulfillmentOrders/example/fulfillments?createShippingLabels=true' \ --header 'Content-Type: application/json' \ --data '{ "fulfillments": [ { "status": "open", "carrier": "DHL", "serviceLevel": "sameDay", "tracking": "JJD000390007882823450", "fulfillmentPackages": [ { "status": "open", "serviceLevel": "sameDay", "package": "small", "fulfilledFromLocationCode": "DERetail001", "weight": 2000, "weightUnit": "g", "dimensions": { "length": 25, "lengthUnit": "mm", "width": 17.5, "widthUnit": "mm", "height": 10, "heightUnit": "mm" }, "tracking": "JJD000390007882823450", "pickUpBy": "Kim Muster", "labelUrl": "https://documentserver.internal/label/label.pdf", "labelType": "pdf", "fulfillmentDate": "2026-04-15T12:00:00Z", "packageItems": [ { "salesOrderLineItemCode": "386", "quantity": 1 } ] } ] } ] }'Creating fulfillments for directShip fulfillmentOrders
Creating fulfillments for fulfillmentOrders of type directShip requires the following fields, although they are not marked as required by the API documentation:
- serviceLevel
- carrier
- package code or package dimensions
- weight Additionally, the fulfillmentOrder address has to contain the following fields:
- firstName
- lastName
- address1
- city
- postalCode
- emailAddress
- country
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
Unique merchant code which represents the unique “merchant account”.
orderNumber
required
string
Unique order number
Query Parameters
Section titled “Query Parameters”createShippingLabels
boolean
If set to true, one shipping label per fulfillment package will be created at the configured shipping provider(s)
Request Body
Section titled “Request Body”Media typeapplication/json
object
fulfillments
required
Array<object>
object
status
required
string
carrier
string
Example
DHLserviceLevel
string
Example
sameDaytracking
string
Example
JJD000390007882823450fulfillmentPackages
required
Array<object>
object
status
string
serviceLevel
string
Example
sameDaypackage
string
Example
smallfulfilledFromLocationCode
required
string
Example
DERetail001weight
The actual package weight.
number format: float
Example
2000weightUnit
string
dimensions
object
length
number format: float
Example
25lengthUnit
string
Example
cmwidth
number format: float
Example
17.5widthUnit
string
Example
cmheight
number format: float
Example
10heightUnit
string
Example
cmtracking
string
Example
JJD000390007882823450pickUpBy
string
Example
Kim MusterlabelUrl
string
Example
https://documentserver.internal/label/label.pdflabelType
string
fulfillmentDate
The date and time of the package entering status “inTransit” or “fulfilled”.
string format: date-time
packageItems
required
Array<object>
object
salesOrderLineItemCode
required
string
Example
386quantity
required
number
key
additional properties
any
Responses
Section titled “Responses”Fulfillment groups created
Media typeapplication/json
object
ids
Array<number>
errors
Array<object>
object
entityIndex
number
entity
string
entityId
string
code
number
message
string
subentityPath
Array<string | null | number>
Example
{ "ids": [ 100 ]}Merchant or fulfillment order not found
Media typeapplication/json

