POST /purchases/{id}/return-label.json

POST /purchases/{id}/return-label.json

Path parameters

  • id integer(int64) Required

    Numeric ID of the instance

    Minimum value is 1.

application/json

Body Required

  • aftershipId string | null

    Aftership

  • commercialInvoiceUrl string | null

    Commercial invoice url

  • createdAt string(date-time)

    Created at

  • days integer(int32) | null

    Days

  • dropshipmentId integer(int32) | null

    Dropshipment

  • durationTerms string | null

    Duration terms

  • fulfillmentId integer(int32) | null

    Fulfillment

  • grams number | null Required

    Grams

    Default value is 0.

  • id integer(int32)

    Id

  • labelError string | null

    Label error

  • labelFileFormat string | null

    Label file format

    Values are png or pdf.

  • labelRefund boolean | null Required

    Label refund

    Default value is false.

  • labelUrl string | null

    Label url

  • price number | null Required

    Price

    Default value is 0.

  • provider string | null

    Provider

  • purchaseId integer(int32) | null

    Purchase

  • quoteId string | null

    Quote

  • serviceLevel string | null

    Service level

  • serviceLevelTerms string | null

    Service level terms

  • shippoLabelIds array[string] | null

    Shippo label ids

  • tags array[string] | null

    Tags

  • trackingCompany string | null

    Tracking company

  • trackingNumber string | null

    Tracking number

  • trackingStatus string | null

    Tracking status

    Values are delivered, failure, pre_transit, returned, transit, or unknown.

  • trackingStatusDate string(date-time) | null

    Tracking status date

  • trackingStatusDetails string | null

    Tracking status details

  • trackingUrl string | null

    Tracking url

  • updatedAt string(date-time)

    Updated at

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • aftershipId string | null

      Aftership

    • commercialInvoiceUrl string | null

      Commercial invoice url

    • createdAt string(date-time)

      Created at

    • days integer(int32) | null

      Days

    • dropshipmentId integer(int32) | null

      Dropshipment

    • durationTerms string | null

      Duration terms

    • fulfillmentId integer(int32) | null

      Fulfillment

    • grams number | null Required

      Grams

      Default value is 0.

    • id integer(int32)

      Id

    • labelError string | null

      Label error

    • labelFileFormat string | null

      Label file format

      Values are png or pdf.

    • labelRefund boolean | null Required

      Label refund

      Default value is false.

    • labelUrl string | null

      Label url

    • price number | null Required

      Price

      Default value is 0.

    • provider string | null

      Provider

    • purchaseId integer(int32) | null

      Purchase

    • quoteId string | null

      Quote

    • serviceLevel string | null

      Service level

    • serviceLevelTerms string | null

      Service level terms

    • shippoLabelIds array[string] | null

      Shippo label ids

    • tags array[string] | null

      Tags

    • trackingCompany string | null

      Tracking company

    • trackingNumber string | null

      Tracking number

    • trackingStatus string | null

      Tracking status

      Values are delivered, failure, pre_transit, returned, transit, or unknown.

    • trackingStatusDate string(date-time) | null

      Tracking status date

    • trackingStatusDetails string | null

      Tracking status details

    • trackingUrl string | null

      Tracking url

    • updatedAt string(date-time)

      Updated at

POST /purchases/{id}/return-label.json
curl \
 --request POST 'http://api.example.com/v1/purchases/{id}/return-label.json' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"aftershipId":"string","commercialInvoiceUrl":"string","createdAt":"2025-05-04T09:42:00Z","days":42,"dropshipmentId":42,"durationTerms":"string","fulfillmentId":42,"grams":0,"id":42,"labelError":"string","labelFileFormat":"png","labelFiles":{},"labelRefund":false,"labelUris":{},"labelUrl":"string","price":0,"provider":"string","purchaseId":42,"quoteId":"string","serviceLevel":"string","serviceLevelTerms":"string","shippoLabelIds":["string"],"tags":["string"],"trackingCompany":"string","trackingNumber":"string","trackingStatus":"delivered","trackingStatusDate":"2025-05-04T09:42:00Z","trackingStatusDetails":"string","trackingUrl":"string","updatedAt":"2025-05-04T09:42:00Z"}'
Request examples
{
  "aftershipId": "string",
  "commercialInvoiceUrl": "string",
  "createdAt": "2025-05-04T09:42:00Z",
  "days": 42,
  "dropshipmentId": 42,
  "durationTerms": "string",
  "fulfillmentId": 42,
  "grams": 0,
  "id": 42,
  "labelError": "string",
  "labelFileFormat": "png",
  "labelFiles": {},
  "labelRefund": false,
  "labelUris": {},
  "labelUrl": "string",
  "price": 0,
  "provider": "string",
  "purchaseId": 42,
  "quoteId": "string",
  "serviceLevel": "string",
  "serviceLevelTerms": "string",
  "shippoLabelIds": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "trackingCompany": "string",
  "trackingNumber": "string",
  "trackingStatus": "delivered",
  "trackingStatusDate": "2025-05-04T09:42:00Z",
  "trackingStatusDetails": "string",
  "trackingUrl": "string",
  "updatedAt": "2025-05-04T09:42:00Z"
}
Response examples (200)
{
  "aftershipId": "string",
  "commercialInvoiceUrl": "string",
  "createdAt": "2025-05-04T09:42:00Z",
  "days": 42,
  "dropshipmentId": 42,
  "durationTerms": "string",
  "fulfillmentId": 42,
  "grams": 0,
  "id": 42,
  "labelError": "string",
  "labelFileFormat": "png",
  "labelFiles": {},
  "labelRefund": false,
  "labelUris": {},
  "labelUrl": "string",
  "price": 0,
  "provider": "string",
  "purchaseId": 42,
  "quoteId": "string",
  "serviceLevel": "string",
  "serviceLevelTerms": "string",
  "shippoLabelIds": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "trackingCompany": "string",
  "trackingNumber": "string",
  "trackingStatus": "delivered",
  "trackingStatusDate": "2025-05-04T09:42:00Z",
  "trackingStatusDetails": "string",
  "trackingUrl": "string",
  "updatedAt": "2025-05-04T09:42:00Z"
}