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

# Undo Add Product (Optional)

> Remove a product from a customer's order that was previously added using the add-product endpoint. Implementation of this endpoint is optional - if not implemented, customers will not be able to undo their purchases in the email upsell widget.



## OpenAPI

````yaml /openapi.json post /zaymo/upsells/undo-add-product
openapi: 3.0.1
info:
  title: Zaymo Custom Integration API
  description: >-
    API for managing product upsells, customer interactions, and custom actions
    in email campaigns
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.your-domain.com/example/
security:
  - apiKeyAuth: []
tags:
  - name: Upsells
    description: Endpoints for managing product upsells in emails
  - name: Customer Portal
    description: Endpoints for customer subscription management portal
  - name: Swap Up
    description: Endpoints for swapping a customer's current subscription product
  - name: Reactivate
    description: Endpoints for reactivating cancelled subscriptions
  - name: Custom Actions
    description: Endpoints for executing custom actions from email buttons
  - name: Discounts
    description: Endpoints for retrieving discount information
paths:
  /zaymo/upsells/undo-add-product:
    post:
      tags:
        - Upsells
      summary: Undo Add Product (Optional)
      description: >-
        Remove a product from a customer's order that was previously added using
        the add-product endpoint. Implementation of this endpoint is optional -
        if not implemented, customers will not be able to undo their purchases
        in the email upsell widget.
      requestBody:
        description: Product and customer information for removing from order
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveProductRequest'
        required: true
      responses:
        '200':
          description: Product successfully removed from order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Product or customer not found, or product was not in the order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RemoveProductRequest:
      type: object
      required:
        - email
        - product_id
      properties:
        email:
          type: string
          format: email
          description: The email address of the customer
        product_id:
          type: string
          description: The unique identifier for the product to be removed from the order
    SuccessResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          example: true
          description: Indicates if the request was successful
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Human-readable error message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Zaymo-API-Key
      description: Zaymo will authenticate requests using the API key you provide

````