Skip to main content

Anonymize Orders

POST 

https://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

Body

    data object
    order_idsstring[]

    The unique identifiers of the orders to be anonymized. You can anonymize multiple orders at the same time.

Responses

OK

Schema
    data object
    typestring

    Specifies the type of object being returned. You must use order.

    Possible values: [order]

    order_numberstring

    Specifies a user-managed, optional field used as an alternative to the existing order_id. If provided, the order-number will be sent to Authorize.net instead of the order_id, and will appear as the invoice number in Authorize.net transactions.

    external_refstring

    An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.

    iduuid

    Specifies the unique identifier of the order.

    statusstring

    Specifies the status of the order, such as incomplete, complete, processing, or cancelled.

    Possible values: [complete, incomplete, cancelled, processing]

    paymentstring

    Specifies the status of the payment, such as unpaid, authorized, paid, or refunded.

    Possible values: [authorized, paid, unpaid, refunded, partially_paid, partially_authorized]

    shippingstring

    Specifies the status of the shipment, such as fulfilled or unfulfilled.

    Possible values: [unfulfilled, fulfilled]

    anonymizedboolean

    Specifies if the order is anonymized.

    payment_intent_idstring

    Stripe Payment Intent ID. Please see Stripe's Payment Intent documentation for more information on Payment Intents.

    custom_attributesobject

    Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute values must correspond to the assigned types.

    Example:

    "custom_attributes": { "is_member": { "type": "boolean", "value": true }, "membership_level": { "type": "string", "value": "premium" } }
    meta object
    timestamps object
    created_atstring

    The date this was created.

    updated_at

    The date this was last updated.

    display_price object
    with_tax object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    without_tax object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    tax object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    discount object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    balance_owing object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    paid object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    authorized object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    without_discount object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    shipping object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    shipping_discount object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    billing_address object
    first_namestringrequired

    First name of the billing recipient.

    last_namestringrequired

    Last name of the billing recipient.

    company_namestringrequired

    Company name of the billing recipient.

    line_1stringrequired

    First line of the billing address.

    line_2stringrequired

    Second line of the billing address.

    citystringrequired

    City of the billing address.

    postcodestringrequired

    Postcode of the billing address.

    countystringrequired

    County of the billing address.

    countrystringrequired

    Country of the billing address.

    regionstringrequired

    State, province, or region of the billing address.

    contact object
    emailstring

    The email address of the contact.

    namestring

    The name of the contact.

    customer object
    emailstring

    The email address of the contact.

    namestring

    The name of the contact.

    shipping_address object
    first_namestringrequired

    First name of the shipping recipient.

    last_namestringrequired

    Last name of the shipping recipient.

    phone_numberstringrequired

    Phone number of the shipping recipient.

    company_namestringrequired

    Company of the shipping recipient.

    line_1stringrequired

    First line of the shipping address.

    line_2stringrequired

    Second line of the shipping address.

    citystringrequired

    City of the shipping address.

    postcodestringrequired

    Post code of the shipping address.

    countystringrequired

    County of the shipping address.

    countrystringrequired

    Country of the shipping address.

    regionstringrequired

    State, province, or region of the shipping address.

    instructionsstringrequired

    Delivery instructions.

    relationships object
    items object

    Array of relationships

    data object[]

    Individual relationships

  • Array [
  • typestring

    The type of related resource.

    iduuid

    The ID of the related resource.

  • ]
  • custom_discounts object

    Array of relationships

    data object[]

    Individual relationships

  • Array [
  • typestring

    The type of related resource.

    iduuid

    The ID of the related resource.

  • ]
  • promotions object

    Array of relationships

    data object[]

    Individual relationships

  • Array [
  • typestring

    The type of related resource.

    iduuid

    The ID of the related resource.

  • ]
  • customer object

    Single relationship

    data object

    Relationship data entry

    typestring

    The type of related resource.

    iduuid

    The ID of the related resource.

    account object

    Single relationship

    data object

    Relationship data entry

    typestring

    The type of related resource.

    iduuid

    The ID of the related resource.

    account_member object

    Single relationship

    data object

    Relationship data entry

    typestring

    The type of related resource.

    iduuid

    The ID of the related resource.

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://useast.api.elasticpath.com/v2/orders/anonymize");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"order_ids\": [\n \"string\"\n ]\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Body
{
  "data": {
    "order_ids": [
      "string"
    ]
  }
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.