> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sideshift.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Erase a shopper

> Call from a trusted server when a shopper asks the custom store or the app to erase their data. Uses the store's Orders API key and the Orders API rate limit. Erases the same data as a Shopify customers/redact request, in each store of the same site or app in the account (the same domain and platform), and in no other account. Send every identifier you hold for the shopper. A repeat returns zero counts and changes nothing. A Shopify store's key is refused; Shopify's own erasure request reaches SideShift through the SideShift Shopify app.



## OpenAPI

````yaml /openapi/commerce-orders.yaml post /privacy/erase
openapi: 3.0.3
info:
  title: SideShift Orders API
  version: 1.0.0
  description: >-
    Verified custom-store purchases, cumulative refunds and funnel events. Uses
    a store Orders API key, not platform OAuth. Store tracking must be enabled.
servers:
  - url: https://app.sideshift.app/api/commerce
security:
  - StoreOrdersKey: []
paths:
  /privacy/erase:
    post:
      tags:
        - Privacy
      summary: Erase a shopper
      description: >-
        Call from a trusted server when a shopper asks the custom store or the
        app to erase their data. Uses the store's Orders API key and the Orders
        API rate limit. Erases the same data as a Shopify customers/redact
        request, in each store of the same site or app in the account (the same
        domain and platform), and in no other account. Send every identifier you
        hold for the shopper. A repeat returns zero counts and changes nothing.
        A Shopify store's key is refused; Shopify's own erasure request reaches
        SideShift through the SideShift Shopify app.
      operationId: eraseStoreShopper
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreErasure'
            example:
              orderIds:
                - order-1042
              emailHash: 8c87b489ce35cf2e2f39f80e282cb2e804932a56a213983eeeb428407d43b52d
              visitorIds:
                - 8ac8d41e-8e6e-433c-bec7-19c4e027f2e7
      responses:
        '200':
          description: Erased. Counts only.
          content:
            application/json:
              schema:
                type: object
                required:
                  - orders
                  - orderIdentities
                  - visitors
                  - conversions
                properties:
                  orders:
                    type: integer
                    minimum: 0
                    description: Named orders deleted.
                  orderIdentities:
                    type: integer
                    minimum: 0
                    description: Stored buyer identities deleted.
                  visitors:
                    type: integer
                    minimum: 0
                    description: Visitors whose pixel events were deleted.
                  conversions:
                    type: integer
                    minimum: 0
                    description: Named events (such as registered) deleted.
              example:
                orders: 1
                orderIdentities: 1
                visitors: 2
                conversions: 1
        '400':
          description: >-
            Invalid JSON or fields, no identifier, a list over 100, or a raw
            email or phone.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
        '401':
          description: Missing, invalid, rotated, disconnected-store or Shopify-store key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
        '404':
          description: Store tracking is not enabled for this deployment.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '429':
          description: Rate limit exceeded. Honor Retry-After.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
        '500':
          description: Internal error. Retry the same request with backoff.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
components:
  schemas:
    StoreErasure:
      type: object
      additionalProperties: false
      description: >-
        Send at least one field. A browser that called identify is found through
        emailHash only.
      properties:
        orderIds:
          type: array
          maxItems: 100
          default: []
          description: The store's order IDs, as sent to the Orders API.
          items:
            type: string
            description: Stable identifier, trimmed before validation.
            minLength: 1
            maxLength: 200
        emailHash:
          type: string
          description: >-
            SHA-256, as 64 lowercase hex characters, of the buyer's email with
            leading and trailing spaces removed and made lowercase. The same
            value window.sideshift.identify sends; no key or salt. Send hashes
            only; a raw email, phone, customerEmail or customerPhone field
            returns 400.
          pattern: ^[0-9a-f]{64}$
        phoneHash:
          type: string
          description: >-
            SHA-256, as 64 lowercase hex characters, of '+' followed by only the
            digits of the buyer's phone number, with its country code.
          pattern: ^[0-9a-f]{64}$
        customerId:
          type: string
          description: The store's own ID for the buyer's customer account. Not an email.
          pattern: ^[A-Za-z0-9_-]{1,64}$
        visitorIds:
          type: array
          maxItems: 100
          default: []
          description: SideShift visitor IDs the store holds for the shopper.
          items:
            type: string
            pattern: ^[a-zA-Z0-9_-]{16,128}$
  securitySchemes:
    StoreOrdersKey:
      type: http
      scheme: bearer
      bearerFormat: ss_orders_…
      description: >-
        Store-specific secret generated in Website & sales. Never expose in
        browser code.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.