Body Envelope

Every response is contained in an envelope which means each response has a predictable set of keys with which you can interact.


The meta key helps communicate extra information regarding a response to the developer.

KeyTypeOptional?DescriptionExample
codeNumberUp to a 5-digit code that represents the status of the request200 10001
typeStringshort string, which is the name of the returned HTTP statusOK
messageStringHuman-readable description of the specific meta codeThe request was successfully processed by AfterShip.
errorsError[]✔Detailed error information to indicate the error in the request. It only exists in error responses.
KeyTypeDescriptionExample
pathStringError path of the requestuser.name
infoStringHuman-readable description of the specific erroruser.name is invalid
{ "meta": { "code": 200, "type": "OK", "message": "The request was successfully processed by AfterShip." }, "data": { ... } }

The data key is the meat of the response. It can be in the form of a list of results, but either way, this is where you’ll find the requested data.

Here is an example for POST /email-parses

{ "meta": { "code": 200, "type": "OK", "message": "The request was successfully processed by AfterShip." }, "data": { "orders": [ { ... }, { ... } ], "confidence_score": 0.96 } }