Body Envelope
Every response is contained in an envelope. That is, each response has a predictable set of keys with which you can expect to interact.
meta
The meta key helps communicate extra information regarding a response to the developer.
meta
Key | Type | Optional? | Description | Example |
---|---|---|---|---|
code | Number | Up to a 5-digit code that represents the status of the request | 200 4104 | |
message | String | Human-readable description of the specific meta code | The request was successfully processed by AfterShip Shipping. | |
details | Error[] | Detailed error information to indicate the error in the request. It only exists in error responses. | [] | |
retryable | boolean | To indicate if the request is retryable. | false |
Error
Key | Type | Description | Example |
---|---|---|---|
path | String | Error path of the request | data.shipment.ship_from.country |
info | String | Human-readable description of the specific error | data.shipment.ship_from.country is a required property |
Normal Response
preparing...
Error
preparing...
data
The data key is the meat of the response. It may be a list of results, but either way, this is where you'll find the data you requested.
Here is the example for GET /couriers
preparing...