Order API - Complete Shipment

Complete shipment

Endpoint: PUT *base*/shipment
Authentication: API Key

This will insert back the tracking number and carrier information to Centra. An email will be sent out to the customer with the tracking information.

Remember, for the Shipment to be completed, it has to be paid, Good-to-go, and shipped.

You can select if you want to capture the order, this is often used if the shipments are already created inside Centra. You will get an error as response if the capture did not go through.

Parameters

order
int
required

Order ID to which the shipment belongs.

shipment
int
required

Shipment ID for the shipment to complete.

capture
boolean
optional

Default: true. Try to capture the order. Ignored if the capture was already made earlier for the shipment.

gtg
boolean
optional

Good-to-go. Indicates the items are packed and ready to leave the Warehouse. Required for shipment to complete.

shipped
boolean
optional

Indicates the items have been shipped. Required for shipment to complete.

carrier
string
optional

Carrier used for shipping.

service
string
optional

Service level used for shipping.

packages
int
optional

Number of packages in shipment.

tracking
string
optional

Tracking number for shipment.

returnSlipTracking
string
optional

Return slip tracking number for shipment.

sendEmail
boolean
optional

Decide if Shipping Confirmation e-mail should be sent. If not defined, Store setting "Send Shipping Confirmation" will be used instead.

internalComment
string
optional

Append some text to internal comment field.

xml
boolean
optional

Response in xml format instead of json.

Request example

   PUT <base>/shipment HTTP/1.1
   Content-type: application/json

   {
     "order": "83651",
     "shipment": "83651-1",
     "carrier": "Fedex",
     "service": "Express",
     "packages": 1,
     "tracking": "TRTTET5",
     "returnSlipTracking": "TRTTET6",
     "capture": 1
   }

Response

200 Content-type: application/json

status
string
required

ok if success, else no.

order
int
optional

Order ID that was completed.

shipment
string
optional

Shipment ID that was completed.

msg
string
optional

If status returns no, this value should send back a message why it failed.

Response example

{
  "status": "ok",
  "order": 83651,
  "shipment": "83651-1"
}

Error example

{
  "status": "no",
  "msg": "capture failed",
  "order": 83651,
  "shipment": "83651-1"
}