LettrLabs API
API ReferenceOrders

Delete an order's recipients

Removes the specified recipients from an order. Pass the IDs of the recipients to remove in the request body. The 200 response reports `requestedRecipients` (distinct ids submitted), `deletedRecipients` (rows actually removed), and `notFoundRecipientIds` (submitted ids that matched no recipient on the order) so a caller holding a stale id can detect a no-op instead of receiving a bare success.

DELETE
/v1/order/{id}/recipients

Removes the specified recipients from an order. Pass the IDs of the recipients to remove in the request body. The 200 response reports requestedRecipients (distinct ids submitted), deletedRecipients (rows actually removed), and notFoundRecipientIds (submitted ids that matched no recipient on the order) so a caller holding a stale id can detect a no-op instead of receiving a bare success.

X-API-KEY<token>

In: header

Path Parameters

id*integer

Order id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

recipientsIds*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/order/0/recipients" \  -H "Content-Type: application/json" \  -d '{    "recipientsIds": [      0    ]  }'
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "requestedRecipients": 3,    "deletedRecipients": 2,    "notFoundRecipientIds": [      0    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "requestedRecipients": 3,    "deletedRecipients": 2,    "notFoundRecipientIds": [      0    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "requestedRecipients": 3,    "deletedRecipients": 2,    "notFoundRecipientIds": [      0    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}
Empty
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "requestedRecipients": 3,    "deletedRecipients": 2,    "notFoundRecipientIds": [      0    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}