Complete shipment

Order API v1
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.

Note

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

shipment

int
required
Shipment ID for the shipment to complete.

capture

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

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.

internalComment

string
optional
Append some text to internal comment field.

xml

boolean
optional
Response in xml format instead of json.

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
PUT <base>/shipment HTTP/1.1
Content-type: application/json

{
  "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
Order ID that was completed.

shipment

string
Shipment ID that was completed.

msg

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

Response example

1
2
3
4
5
{
  "status": "ok",
  "order": 83651,
  "shipment": "83651-1"
}

Error example

1
2
3
4
5
6
{
  "status": "no",
  "msg": "capture failed",
  "order": 83651,
  "shipment": "83651-1"
}