PUT /purchases/{id}/cancel.json

PUT /purchases/{id}/cancel.json

Path parameters

  • id integer(int64) Required

    Numeric ID of the instance

    Minimum value is 1.

application/json

Body Required

Responses

PUT /purchases/{id}/cancel.json
curl \
 -X PUT http://api.example.com/v1/purchases/{id}/cancel.json \
 -H "Content-Type: application/json" \
 -d '{"adminNotes":"string","aftershipId":"string","commercialInvoiceUrl":"string","createdAt":"2023-05-04T09:42:00+00:00","days":42,"dropshipProviderAddressId":42,"durationTerms":"string","externalId":"string","files":{},"grams":0,"id":42,"intercomMessageId":"string","labelError":"string","labelFileFormat":"png","labelFiles":{},"labelRefund":false,"labelUrl":"string","muteError":false,"notes":"string","paid":0,"paymentStatus":"notPaid","price":0,"provider":"string","purchaseId":42,"quoteId":"string","reference":"string","returnAddressLineOne":"string","returnAddressLineTwo":"string","returnCity":"string","returnCountry":"string","returnFirstName":"string","returnLabelType":"prePaid","returnLastName":"string","returnName":"string","returnShipmentId":42,"returnState":"string","returnZip":"string","saleId":42,"saleReturnSource":"internal","saleReturnType":"automated","serviceLevel":"string","serviceLevelTerms":"string","shippoLabelIds":["string"],"status":"requested","tags":["string"],"trackingCompany":"string","trackingNumber":"string","trackingStatus":"delivered","trackingStatusDate":"2023-05-04T09:42:00+00:00","trackingStatusDetails":"string","trackingUrl":"string","updatedAt":"2023-05-04T09:42:00+00:00","userId":42,"vendorCancelledAt":"2023-05-04T09:42:00+00:00","vendorReceivedId":"string","vendorReceivedStatus":"notSent"}'
Request example
{
  "adminNotes": "string",
  "aftershipId": "string",
  "commercialInvoiceUrl": "string",
  "createdAt": "2023-05-04T09:42:00+00:00",
  "days": 42,
  "dropshipProviderAddressId": 42,
  "durationTerms": "string",
  "externalId": "string",
  "files": {},
  "grams": 0,
  "id": 42,
  "intercomMessageId": "string",
  "labelError": "string",
  "labelFileFormat": "png",
  "labelFiles": {},
  "labelRefund": false,
  "labelUrl": "string",
  "muteError": false,
  "notes": "string",
  "paid": 0,
  "paymentStatus": "notPaid",
  "price": 0,
  "provider": "string",
  "purchaseId": 42,
  "quoteId": "string",
  "reference": "string",
  "returnAddressLineOne": "string",
  "returnAddressLineTwo": "string",
  "returnCity": "string",
  "returnCountry": "string",
  "returnFirstName": "string",
  "returnLabelType": "prePaid",
  "returnLastName": "string",
  "returnName": "string",
  "returnShipmentId": 42,
  "returnState": "string",
  "returnZip": "string",
  "saleId": 42,
  "saleReturnSource": "internal",
  "saleReturnType": "automated",
  "serviceLevel": "string",
  "serviceLevelTerms": "string",
  "shippoLabelIds": [
    "string"
  ],
  "status": "requested",
  "tags": [
    "string"
  ],
  "trackingCompany": "string",
  "trackingNumber": "string",
  "trackingStatus": "delivered",
  "trackingStatusDate": "2023-05-04T09:42:00+00:00",
  "trackingStatusDetails": "string",
  "trackingUrl": "string",
  "updatedAt": "2023-05-04T09:42:00+00:00",
  "userId": 42,
  "vendorCancelledAt": "2023-05-04T09:42:00+00:00",
  "vendorReceivedId": "string",
  "vendorReceivedStatus": "notSent"
}
Response examples (200)
{
  "adminNotes": "string",
  "aftershipId": "string",
  "commercialInvoiceUrl": "string",
  "createdAt": "2023-05-04T09:42:00+00:00",
  "days": 42,
  "dropshipProviderAddressId": 42,
  "durationTerms": "string",
  "externalId": "string",
  "files": {},
  "grams": 0,
  "id": 42,
  "intercomMessageId": "string",
  "labelError": "string",
  "labelFileFormat": "png",
  "labelFiles": {},
  "labelRefund": false,
  "labelUrl": "string",
  "muteError": false,
  "notes": "string",
  "paid": 0,
  "paymentStatus": "notPaid",
  "price": 0,
  "provider": "string",
  "purchaseId": 42,
  "quoteId": "string",
  "reference": "string",
  "returnAddressLineOne": "string",
  "returnAddressLineTwo": "string",
  "returnCity": "string",
  "returnCountry": "string",
  "returnFirstName": "string",
  "returnLabelType": "prePaid",
  "returnLastName": "string",
  "returnName": "string",
  "returnShipmentId": 42,
  "returnState": "string",
  "returnZip": "string",
  "saleId": 42,
  "saleReturnSource": "internal",
  "saleReturnType": "automated",
  "serviceLevel": "string",
  "serviceLevelTerms": "string",
  "shippoLabelIds": [
    "string"
  ],
  "status": "requested",
  "tags": [
    "string"
  ],
  "trackingCompany": "string",
  "trackingNumber": "string",
  "trackingStatus": "delivered",
  "trackingStatusDate": "2023-05-04T09:42:00+00:00",
  "trackingStatusDetails": "string",
  "trackingUrl": "string",
  "updatedAt": "2023-05-04T09:42:00+00:00",
  "userId": 42,
  "vendorCancelledAt": "2023-05-04T09:42:00+00:00",
  "vendorReceivedId": "string",
  "vendorReceivedStatus": "notSent"
}