Mailchimp Carts API

The Carts API from Mailchimp — 4 operation(s) for carts.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

mailchimp-carts-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  version: 3.0.55
  title: Mailchimp Marketing Abuse Carts API
  contact:
    name: Mailchimp API Support
    email: apihelp@mailchimp.com
  x-permalink: https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/main/spec/marketing.json
  description: '

    The Mailchimp Marketing API provides programmatic access to Mailchimp data

    and functionality, allowing developers to build custom features to do

    things like sync email activity and campaign analytics with their

    database, manage audiences and campaigns, and more.'
host: server.api.mailchimp.com
basePath: /3.0
schemes:
- https
consumes:
- application/json
produces:
- application/json
- application/problem+json
security:
- basicAuth: []
tags:
- name: Carts
paths:
  /ecommerce/stores/{store_id}/carts:
    get:
      summary: Mailchimp List Carts
      description: Get information about a store's carts.
      operationId: getEcommerceStoresIdCarts
      parameters:
      - name: fields
        x-title: Fields
        in: query
        description: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
        required: false
        type: array
        collectionFormat: csv
        items:
          type: string
        example: example_value
      - name: exclude_fields
        x-title: Exclude Fields
        in: query
        description: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
        required: false
        type: array
        collectionFormat: csv
        items:
          type: string
        example: example_value
      - name: count
        x-title: Count
        in: query
        description: The number of records to return. Default value is 10. Maximum value is 1000
        required: false
        default: 10
        maximum: 1000
        type: integer
        example: example_value
      - name: offset
        x-title: Offset
        in: query
        description: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
        required: false
        default: 0
        type: integer
        example: example_value
      - name: store_id
        x-title: Store ID
        description: The store id.
        in: path
        required: true
        type: string
        example: '500123'
      responses:
        '200':
          description: ''
          schema:
            type: object
            title: Carts
            description: A collection of a store's carts.
            properties:
              store_id:
                type: string
                title: Store ID
                description: The store id.
              carts:
                type: array
                title: E-commerce Store Carts
                description: An array of objects, each representing a cart.
                items:
                  type: object
                  title: E-commerce Cart
                  description: Information about a specific cart.
                  properties:
                    id:
                      type: string
                      title: Cart Foreign ID
                      description: A unique identifier for the cart.
                      readOnly: true
                    customer:
                      type: object
                      title: E-commerce Customer
                      description: Information about a specific customer.
                      properties:
                        id:
                          type: string
                          title: Customer Foreign ID
                          description: A unique identifier for the customer.
                          readOnly: true
                        email_address:
                          type: string
                          title: Email Address
                          description: The customer's email address.
                          readOnly: true
                        opt_in_status:
                          type: boolean
                          title: Opt-in Status
                          description: The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers).
                        company:
                          type: string
                          title: Company
                          description: The customer's company.
                        first_name:
                          type: string
                          title: First Name
                          description: The customer's first name.
                        last_name:
                          type: string
                          title: Last Name
                          description: The customer's last name.
                        orders_count:
                          type: integer
                          title: Orders Count
                          description: The customer's total order count.
                          readOnly: true
                          example: 4
                        total_spent:
                          type: number
                          title: Total Spent
                          description: The total amount the customer has spent.
                          readOnly: true
                          example: 100
                        address:
                          type: object
                          title: Address
                          description: The customer's address.
                          properties:
                            address1:
                              type: string
                              title: Address Field 1
                              description: The mailing address of the customer.
                              example: 675 Ponce de Leon Ave NE
                            address2:
                              type: string
                              title: Address Field 2
                              description: An additional field for the customer's mailing address.
                              example: Suite 5000
                            city:
                              type: string
                              title: 'City '
                              description: The city the customer is located in.
                              example: Atlanta
                            province:
                              type: string
                              title: Province
                              description: The customer's state name or normalized province.
                              example: Georgia
                            province_code:
                              type: string
                              title: Province Code
                              description: The two-letter code for the customer's province or state.
                              example: GA
                            postal_code:
                              type: string
                              title: Postal Code
                              description: The customer's postal or zip code.
                              example: '30308'
                            country:
                              type: string
                              title: Country Code
                              description: The customer's country.
                              example: United States
                            country_code:
                              type: string
                              title: Country Code
                              description: The two-letter code for the customer's country.
                              example: US
                        created_at:
                          type: string
                          title: Creation Time
                          format: date-time
                          description: The date and time the customer was created in ISO 8601 format.
                          readOnly: true
                          example: '2015-07-15T19:28:00+00:00'
                        updated_at:
                          type: string
                          title: Update Time
                          format: date-time
                          description: The date and time the customer was last updated in ISO 8601 format.
                          readOnly: true
                          example: '2015-07-15T19:28:00+00:00'
                        _links:
                          title: Links
                          description: A list of link types and descriptions for the API schema documents.
                          type: array
                          items:
                            type: object
                            title: Resource Link
                            description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                            properties:
                              rel:
                                type: string
                                title: Rel
                                description: As with an HTML 'rel' attribute, this describes the type of link.
                                readOnly: true
                              href:
                                type: string
                                title: Href
                                description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                                readOnly: true
                              method:
                                type: string
                                title: Method
                                description: The HTTP method that should be used when accessing the URL defined in 'href'.
                                enum:
                                - GET
                                - POST
                                - PUT
                                - PATCH
                                - DELETE
                                - OPTIONS
                                - HEAD
                                readOnly: true
                              targetSchema:
                                type: string
                                title: Target Schema
                                description: For GETs, this is a URL representing the schema that the response should conform to.
                                readOnly: true
                              schema:
                                type: string
                                title: Schema
                                description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                                readOnly: true
                          readOnly: true
                    campaign_id:
                      type: string
                      title: Campaign ID
                      description: A string that uniquely identifies the campaign associated with a cart.
                      example: 839488a60b
                    checkout_url:
                      type: string
                      title: Checkout URL
                      description: The URL for the cart. This parameter is required for [Abandoned Cart](https://mailchimp.com/help/create-an-abandoned-cart-email/) automations.
                    currency_code:
                      type: string
                      title: Currency Code
                      description: The three-letter ISO 4217 code for the currency that the cart uses.
                    order_total:
                      type: number
                      title: Order Total
                      description: The order total for the cart.
                    tax_total:
                      type: number
                      title: Tax Total
                      description: The total tax for the cart.
                    lines:
                      type: array
                      title: Cart Line Items
                      description: An array of the cart's line items.
                      items:
                        type: object
                        title: E-commerce Cart Line Item
                        description: Information about a specific cart line item.
                        properties:
                          id:
                            type: string
                            title: Cart Line Item Foreign ID
                            description: A unique identifier for the cart line item.
                            readOnly: true
                          product_id:
                            type: string
                            title: Cart Line Product Foreign ID
                            description: A unique identifier for the product associated with the cart line item.
                          product_title:
                            type: string
                            title: Cart Line Product Title
                            description: The name of the product for the cart line item.
                            readOnly: true
                          product_variant_id:
                            type: string
                            title: Cart Line Product Variant Foreign ID
                            description: A unique identifier for the product variant associated with the cart line item.
                          product_variant_title:
                            type: string
                            title: Cart Line Product Variant Title
                            description: The name of the product variant for the cart line item.
                            readOnly: true
                          quantity:
                            type: integer
                            title: Quantity
                            description: The quantity of a cart line item.
                          price:
                            type: number
                            title: Price
                            description: The price of a cart line item.
                          _links:
                            title: Links
                            description: A list of link types and descriptions for the API schema documents.
                            type: array
                            items:
                              type: object
                              title: Resource Link
                              description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                              properties:
                                rel:
                                  type: string
                                  title: Rel
                                  description: As with an HTML 'rel' attribute, this describes the type of link.
                                  readOnly: true
                                href:
                                  type: string
                                  title: Href
                                  description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                                  readOnly: true
                                method:
                                  type: string
                                  title: Method
                                  description: The HTTP method that should be used when accessing the URL defined in 'href'.
                                  enum:
                                  - GET
                                  - POST
                                  - PUT
                                  - PATCH
                                  - DELETE
                                  - OPTIONS
                                  - HEAD
                                  readOnly: true
                                targetSchema:
                                  type: string
                                  title: Target Schema
                                  description: For GETs, this is a URL representing the schema that the response should conform to.
                                  readOnly: true
                                schema:
                                  type: string
                                  title: Schema
                                  description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                                  readOnly: true
                            readOnly: true
                    created_at:
                      type: string
                      title: Creation Time
                      format: date-time
                      description: The date and time the cart was created in ISO 8601 format.
                      readOnly: true
                      example: '2015-07-15T19:28:00+00:00'
                    updated_at:
                      type: string
                      title: Update Time
                      format: date-time
                      description: The date and time the cart was last updated in ISO 8601 format.
                      readOnly: true
                      example: '2015-07-15T19:28:00+00:00'
                    _links:
                      title: Links
                      description: A list of link types and descriptions for the API schema documents.
                      type: array
                      items:
                        type: object
                        title: Resource Link
                        description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                        properties:
                          rel:
                            type: string
                            title: Rel
                            description: As with an HTML 'rel' attribute, this describes the type of link.
                            readOnly: true
                          href:
                            type: string
                            title: Href
                            description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                            readOnly: true
                          method:
                            type: string
                            title: Method
                            description: The HTTP method that should be used when accessing the URL defined in 'href'.
                            enum:
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                            - OPTIONS
                            - HEAD
                            readOnly: true
                          targetSchema:
                            type: string
                            title: Target Schema
                            description: For GETs, this is a URL representing the schema that the response should conform to.
                            readOnly: true
                          schema:
                            type: string
                            title: Schema
                            description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                            readOnly: true
                      readOnly: true
              total_items:
                type: integer
                title: Item Count
                description: The total number of items matching the query regardless of pagination.
                readOnly: true
              _links:
                title: Links
                description: A list of link types and descriptions for the API schema documents.
                type: array
                items:
                  type: object
                  title: Resource Link
                  description: This object represents a link from the resource where it is found to another resource or action that may be performed.
                  properties:
                    rel:
                      type: string
                      title: Rel
                      description: As with an HTML 'rel' attribute, this describes the type of link.
                      readOnly: true
                    href:
                      type: string
                      title: Href
                      description: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
                      readOnly: true
                    method:
                      type: string
                      title: Method
                      description: The HTTP method that should be used when accessing the URL defined in 'href'.
                      enum:
                      - GET
                      - POST
                      - PUT
                      - PATCH
                      - DELETE
                      - OPTIONS
                      - HEAD
                      readOnly: true
                    targetSchema:
                      type: string
                      title: Target Schema
                      description: For GETs, this is a URL representing the schema that the response should conform to.
                      readOnly: true
                    schema:
                      type: string
                      title: Schema
                      description: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
                      readOnly: true
                readOnly: true
        default:
          description: An error generated by the Mailchimp API.
          schema:
            type: object
            title: Problem Detail Document
            description: An error generated by the Mailchimp API. Conforms to IETF draft 'draft-nottingham-http-problem-06'.
            required:
            - type
            - title
            - status
            - detail
            - instance
            properties:
              type:
                type: string
                title: Problem Type
                description: An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
                example: https://mailchimp.com/developer/marketing/docs/errors/
              title:
                type: string
                title: Error Title
                description: A short, human-readable summary of the problem type. It shouldn't change based on the occurrence of the problem, except for purposes of localization.
                example: Resource Not Found
              status:
                type: integer
                title: HTTP Status Code
                description: The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
                example: 404
              detail:
                type: string
                title: Error Message
                description: A human-readable explanation specific to this occurrence of the problem. [Learn more about errors](/developer/guides/get-started-with-mailchimp-api-3/#Errors).
                example: The requested resource could not be found.
              instance:
                type: string
                title: Instance ID
                description: A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
                example: 995c5cb0-3280-4a6e-808b-3b096d0bb219
      deprecated: false
      tags:
      - Carts
      x-custom-config:
        methodNameSnake: get_store_carts
        methodNameCamel: getStoreCarts
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: Mailchimp Add Cart
      description: Add a new cart to a store.
      operationId: postEcommerceStoresIdCarts
      parameters:
      - name: store_id
        x-title: Store ID
        description: The store id.
        in: path
        required: true
        type: string
        example: '500123'
      - name: body
        in: body
        description: ''
        required: true
        schema:
          type: object
          title: E-commerce Cart
          description: Information about a specific cart.
          required:
          - id
          - currency_code
          - customer
          - order_total
          - lines
          properties:
            id:
              type: string
              title: Cart Foreign ID
              description: A unique identifier for the cart.
            customer:
              type: object
              title: E-commerce Customer
              description: Information about a specific customer. For existing customers include only the `id` parameter in the `customer` object body.
              required:
              - id
              properties:
                id:
                  type: string
                  title: Customer Foreign ID
                  description: A unique identifier for the customer. Limited to 50 characters.
                  maxLength: 50
                email_address:
                  type: string
                  title: Email Address
                  description: The customer's email address.
                opt_in_status:
                  type: boolean
                  title: Opt-in Status
                  description: The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers).
                company:
                  type: string
                  title: Company
                  description: The customer's company.
                first_name:
                  type: string
                  title: First Name
                  description: The customer's first name.
                last_name:
                  type: string
                  title: Last Name
                  description: The customer's last name.
                address:
                  type: object
                  title: Address
                  description: The customer's address.
                  properties:
                    address1:
                      type: string
                      title: Address Field 1
                      description: The mailing address of the customer.
                      example: 675 Ponce de Leon Ave NE
                    address2:
                      type: string
                      title: Address Field 2
                      description: An additional field for the customer's mailing address.
                      example: Suite 5000
                    city:
                      type: string
                      title: 'City '
                      description: The city the customer is located in.
                      example: Atlanta
                    province:
                      type: string
                      title: Province
                      description: The customer's state name or normalized province.
                      example: Georgia
                    province_code:
                      type: string
                      title: Province Code
                      description: The two-letter code for the customer's province or state.
                      example: GA
                    postal_code:
                      type: string
                      title: Postal Code
                      description: The customer's postal or zip code.
                      example: '30308'
                    country:
                      type: string
                      title: Country Code
                      description: The customer's country.
                      example: United States
                    country_code:
                      type: string
                      title: Country Code
                      description: The two-letter code for the customer's country.
                      example: US
            campaign_id:
              type: string
              title: Campaign ID
              description: A string that uniquely identifies the campaign for a cart.
              example: 839488a60b
            checkout_url:
              type: string
              title: Checkout URL
              description: The URL for the cart. This parameter is required for [Abandoned Cart](https://mailchimp.com/help/create-an-abandoned-cart-email/) automations.
            currency_code:
              type: string
              title: Currency Code
              description: The three-letter ISO 4217 code for the currency that the cart uses.
            order_total:
              type: number
              title: Order Total
              description: The order total for the cart.
            tax_total:
              type: number
              title: Tax Total
              description: The total tax for the cart.
            lines:
              type: array
              title: Cart Line Items
              description: An array of the cart's line items.
              items:
                type: object
                title: E-commerce Cart Line Item
                description: Information about a specific cart line item.
                required:
                - id
                - product_id
                - product_variant_id
                - quantity
                - price
                properties:
                  id:
                    type: string
                    title: Cart Line Item Foreign ID
                    description: A unique identifier for the cart line item.
                  product_id:
                    type: string
                    title: Cart Line Product Foreign ID
                    description: A unique identifier for the product associated with the cart line item.
                  product_variant_id:
                    type: string
                    title: Cart Line Product Variant Foreign ID
                    description: A unique identifier for the product variant associated with the cart line item.
                  quantity:
                    type: integer
                    title: Quantity
                    description: The quantity of a cart line item.
                  price:
                    type: number
                    title: Price
                    description: The price of a cart line item.
        example: example_value
      responses:
        '200':
          description: ''
          schema:
            type: object
            title: E-commerce Cart
            description: Information about a specific cart.
            properties:
              id:
                type: string
                title: Cart Foreign ID
                description: A unique identifier for the cart.
                readOnly: true
              customer:
                type: object
                title: E-commerce Customer
                description: Information about a specific customer.
                properties:
                  id:
                    type: string
                    title: Customer Foreign ID
                    description: A unique identifier for the customer.
                    readOnly: true
                  email_address:
                    type: string
                    title: Email Address
                    description: The customer's email address.
                    readOnly: true
                  opt_in_status:
                    type: boolean
                    title: Opt-in Status
                    description: The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to 

# --- truncated at 32 KB (153 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mailchimp/refs/heads/main/openapi/mailchimp-carts-api-openapi.yml