Anonymize Orders
POSThttps://useast.api.elasticpath.com/v2/orders/anonymize
You can anonymize an order when it is fulfilled, canceled, or fully refunded.
When anonymization is successful, Personal Identifiable Information such as customer details, shipping_address
, and billing_address
are replaced with *.
Request
- application/json
Body
data object
Responses
- 200
- 401
- 422
OK
- application/json
- Schema
- Example (from schema)
Schema
data object
{
"data": {
"type": "string",
"order_number": "string",
"external_ref": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"payment": "string",
"shipping": "string",
"anonymized": true,
"meta": {
"timestamps": {
"created_at": "string"
},
"with_tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"without_tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"discount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"paid": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"authorized": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"without_discount": {
"amount": 0,
"currency": "string",
"formatted": "string"
}
},
"billing_address": {
"company_name": "string",
"country": "string",
"county": "string",
"first_name": "string",
"last_name": "string",
"line_1": "string",
"line_2": "string",
"postcode": "string",
"region": "string"
},
"contact": {
"email": "string",
"name": "string"
},
"shipping_address": {
"company_name": "string",
"country": "string",
"county": "string",
"first_name": "string",
"last_name": "string",
"line_1": "string",
"line_2": "string",
"postcode": "string",
"region": "string"
}
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
detail string
status string
title string
[
null
]
{
"errors": {
"status": 401,
"title": "Unauthorized"
}
}
Not Found
- application/json
- Schema
- Example (from schema)
- Example
Schema
detail string
status string
title string
[
null
]
{
"errors": {
"detail": "Order has status: order:incomplete, payment:unpaid, shipping:unfulfilled; only fulfilled or refunded or cancelled orders may be anonymized",
"status": 422,
"title": "Could not anonymize orders",
"meta": {
"order_id": "496c29a1-6e7a-4ab6-a4e7-d1ec9a08b85e"
}
}
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://useast.api.elasticpath.com/v2/orders/anonymize' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data": {
"order_ids": [
"string"
]
}
}'
ResponseClear