# This file contains the new API documentation as per new contact management system.  
# Hosted at api.maropost.com/api
---
  openapi: 3.0.0
  info:
    description: |
      Last Update: April 2026
      <br><br>
      Welcome to Maropost's API Guide for Marketing Cloud. Use this guide to understand Maropost's RESTful API and GraphQL API methods.
      <br><br>
      You can download Marketing Cloud’s OpenAPI specification and import it into your favorite API development tool (such as Postman).
      
      # Base URL
      **Production**<br>
      The Base URL for web service requests in the Production environment is https://api.maropost.com, and the access port is port 8410.<br><br>
      <strong>NOTE:</strong>
      * If your Marketing Cloud Account ID is between 4000 and 4999, then the Base URL is https://api-eu1.maropost.com.<br>
      * If your Marketing Cloud Account ID is 5000 or above, then the Base URL is https://api-ca1.maropost.com.

      **Sandbox**<br>
      The Base URL for web service requests in the Development Sandbox environment is https://sandbox-web.maropost.com, and the access port is port 22.
      
      # Authentication
      The authentication header is **authorization** and its value follows the **&lt;type&gt;&nbsp;&lt;credentials&gt;** format where:
      * type: ApiKey
      * credentials: _your api key_
      > Example:<br>
      > **authorization: ApiKey cX0jDycWdjUYgl0DR2PhC47rujWjgCHumqgjk**

      To create an API key, log in to your Marketing Cloud account. Then from the Settings page, click the API Keys tile, and then click the Add Key button.</br>
      
      You can create as many different API keys as necessary. You can also restrict the scope of any API key that you create. We recommend this “least access required” security model when integrating your Marketing Cloud account with 3rd party platforms. You should create a different API key for each integration.<br>

      To learn more, read [API Keys](https://galaxy.maropost.com/s/article/API-Keys) in the Maropost Galaxy portal.

      # Whitelisting
      For extra security, Marketing Cloud supports optional IP address whitelisting.  By default, calls to Marketing Cloud's API server for each authentication token will be accepted regardless of the calling server's IP address.  But if you choose to add a whitelisted IP address to a specific authentication token, then any calls to the API server using that token must originate from the whitelisted IP address(es).  If a call comes from any other IP address, then the server will respond with the HTTP Status Code 403.


      # Headers
      Both the **Content-Type** and **Accept** headers should be set to **application/json**.
      
      # Rate Limiting
      Maropost’s API gateway accommodates high throughput. Each account is allowed up to 10 concurrent calls. There are no time limits. Multi-threaded calls to circumvent the concurrency restriction are not allowed.
      
      The API server will return an HTTP Status Code 429 if a method call exceeds the concurrency limit. It is expected that you have a message queue with retry mechanism to reinitiate a blocked call.
           
      # Optional Query String Parameters
      * per: Marketing Cloud’s GET methods return 200 objects per virtual “page” by default. Using this optional parameter, you can specify between 200 and 5000 objects per page.
      * page: After you have specified the number of objects to return per page in your first method call, use this optional parameter with each subsequent call to retrieve the data stored on each subsequent virtual page. If you specify a page having no data, then the method will return an empty array.
     
      # Tips for Correct Usage
      * Access the API methods via HTTPS to take advantage of the security inherent to this protocol.  Connect using SSL/TLS 1.2.
      * The HTTP protocol is not designed for socket connections that remain open for extended periods of time. There is an inherent time-out that all web servers observe. For this reason, REST is not normally appropriate for retrieving a vast amount of data out of Marketing Cloud. Consider using the GraphQL API for your bulk data retrieval needs.   
     
      # GraphQL
      Marketing Cloud supports the GraphQL specification for, in many cases, a more efficient format for data retrieval.  At present, Marketing Cloud supports the **query** operation only.

      GraphQL schemas are self-documenting through introspection.  You can easily view these schemas using any introspection tool like GraphiQL or Postman.

      > _**Example: How to use Postman for introspection of Marketing Cloud's GraphQL schemas**_<br>
      > Launch Postman on your computer.<br>
      > Select "New".<br>
      > Select "GraphQL".<br>
      > Enter the URL for the GraphQL server: **_Base URL_**/accounts/:account_id/graphql.json<br>
      > Add your authentication token in the headers (see above).<br>
      > Click the link "Use GraphQL Introspection".<br>
      ><br>
      >Marketing Cloud's GraphQL schema will now appear in your Postman instance.

      You can also view a more detailed explanation of each top-level object here.

      Currently, Marketing Cloud's GraphQL API supports data retrieval for the following top-level objects:
      * Contacts
        * Default records per query: 150
        * Maximum limit: 240,500
      * Campaigns
        * Default records per query: 3
        * Maximum limit: 7500
      * Journeys
        * Default records per query: 5
        * Maximum limit: 25
      * Orders
        * Default records per query: 200
        * Maximum limit: 80,500
      * Products
        * Default records per query: 200
        * Maximum limit: 80,500

      If you wish your output to include more than the default number of records, be sure to include the _per_ argument in your GraphQL query.

      Each GraphQL query has a cost associated with it depending upon the data that you want to retrieve.

      Follow this example for computing the cost of a single GraphQL query:
      > {<br>
        &nbsp;&nbsp;campaigns(per: 3){<br>
        &nbsp;&nbsp;&nbsp;&nbsp;opens(per: 20){<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email<br>
        &nbsp;&nbsp;&nbsp;&nbsp;}<br>
        &nbsp;&nbsp;&nbsp;&nbsp;sends(per: 10){<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email<br>
        &nbsp;&nbsp;}<br>
        &nbsp;&nbsp;&nbsp;&nbsp;}<br>
        }<br>
      > <br>
      > This payload costs 93 points and is calculated as:<br>
      > 3 + (3x20) + (3x10) = 93


    title: Maropost Marketing Cloud API
    version: ''
    x-logo:
      url: "https://id-staging.maropost.com/icons/maropost-logo.svg"
      altText: Maropost logo
  paths:
  # content
    "/accounts/:account_id/contents.json":
      get:
        summary: Get Email Contents 
        description: Returns a list of all email content
        tags:
        - Content
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: page_count
          in: query
          description: _(optional)_ When set to "true", returns only the page count of the list of Email Content.
          example: false
          schema:
            type: boolean
        - name: from
          in: query
          description: _(optional)_ Returns Email Content that were created or updated within the date range.  NOTE-- **from** and **to** must be included together.
          example: 2024-01-01
          schema:
            type: date-time
        - name: to 
          in: query
          description: _(optional)_ Returns Email Content that were created or updated within the date range.  NOTE-- **from** and **to** must be included together.
          example: 2024-05-31
          schema:
            type: date-time
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 44975
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: "New Fall Promo"
                      content_template_id:
                        type: integer
                        example: 1298
                      pull_url:
                        type: string
                        example: "https://host.example.com/content/email_content.html"
                      footer_type:
                        type: string
                        example: "Custom Footer"
                      footer_id:
                        type: integer
                        example: 344
                      content_feed_id:
                        type: integer
                        example: 2432
                      full_email:
                        type: boolean
                        example: false
                      folder_id:
                        type: integer
                        example: 4                    
                      created_at:
                        type: date-time
                        example: '2023-05-24T00:47:51.581-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-05-24T00:47:51.581-04:00'
                      status:
                        type: string
                        example: "active"
                      thumbnail:
                        type: object
                        properties:
                          url:
                            type: string
                            example: "https://cdn-m4m.chd01.com/pro/uploads/content_thumbnails/account_11370/123/content_thumbnail.jpg" 
                      total_pages:
                        type: integer
                        example: 101

      post:
        summary: Create Email Content
        description: |
         Creates a new email content.
         
         > Note: The **footer_type** field can be set as "default_footer", "custom_footer", or "no_footer". To use the account's default custom footer in the content, leave the footer_type field blank.
        tags:
        - Content
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID.
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "New Fall Promo"
                      text_part:
                        type: string
                        example: "Hey there ... Don't delay!  These deals won't last."
                      html_part:
                        type: string
                        example: "<html><body> ... </body></html>"
                      full_email:
                        type: boolean
                        example: false
                      footer_type:
                        type: string
                        example: default_footer
                      footer_id:
                        type: string
                        example: ""
                    required:
                    - name
                    - html_part
                required:
                - content

    "/accounts/:account_id/contents/:id.json":
      get:
        summary: Get Email Content
        description: Returns the details of an email content
        tags:
        - Content
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the email content
          example: 41970
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 41970
                    account_id:
                      type: integer
                      example: 11370
                    name:
                      type: string
                      example: "New Fall Promo"
                    content_template_id:
                      type: integer
                      example: 1298
                    pull_url:
                      type: string
                      example: "https://host.example.com/content/email_content.html"
                    footer_type:
                      type: string
                      example: "Custom Footer"
                    footer_id:
                      type: integer
                      example: 344
                    content_feed_id:
                      type: integer
                      example: 2432
                    full_email:
                      type: boolean
                      example: false
                    folder_id:
                      type: integer
                      example: 4                    
                    created_at:
                      type: date-time
                      example: '2023-05-24T00:47:51.581-04:00'
                    updated_at:
                       type: date-time
                       example: '2023-05-24T00:47:51.581-04:00'
                    status:
                      type: string
                      example: "active"
                    thumbnail:
                      type: object
                      properties:
                        url:
                          type: string
                          example: "https://cdn-m4m.chd01.com/pro/uploads/content_thumbnails/account_11370/123/content_thumbnail.jpg" 
                    total_pages:
                      type: integer
                      example: 101
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    error:
                      type: string
                      example: "Content not found with id"
      put:
        summary: Update Email Content
        description: |
          Updates an email content.

          > Note: The **footer_type** field can be set as "default_footer", "custom_footer", or "no_footer". To use the account's default custom footer in the content, leave the footer_type field blank.\
        tags:
        - Content
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the email content
          example: 41970
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "New Fall Promo"
                      text_part:
                        type: string
                        example: "Hey there ... Don't delay!  These deals won't last."
                      html_part:
                        type: string
                        example: "<html><body> ... </body></html>"
                      full_email:
                        type: boolean
                        example: false
                      footer_type:
                        type: string
                        example: default_footer
                      footer_id:
                        type: string
                        example: ""
                    required:
                    - name
                    - html_part
                required:
                - content

      delete:
        summary: Delete Email Content
        description: Deletes an email content
        tags:
        - Content
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the email content
          example: 41970
          schema:
            type: integer

    "/accounts/:account_id/contents/all_contents.json":
      get:
        summary: Get Content IDs and Names
        description: Returns a list of all the IDs and names of the email content
        tags:
        - Content
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 44975
                      name:
                        type: string
                        example: "New Fall Promo"

  #content template
    "/accounts/:account_id/content_templates.json":
      get:
        summary: Get Content Templates
        description: Returns a list of email content templates.
        tags:
        - Content Templates
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 716
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: "Single Hero Image"
                      html_part:
                        type: string
                        example: "<html><body> ... </body></html>"
                      editor_ids:
                        type: array
                        items:
                          type: integer
                          example: 1821, 3940
                      owner_id:
                        type: integer
                        example: 13
                      tag_name:
                        type: string
                        example: null
                      created_at:
                        type: date-time
                        example: '2023-05-24T03:42:57.565-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-05-24T03:42:57.565-04:00'
                      folder_id:
                        type: integer
                        example: 23
                      editor_type:
                        type: integer
                        description: 0 = created with the WYSIWYG Editor; 5 = created with the Drag-and-Drop Editor
                        example: 5
                      permissions:
                        type: string
                        example: null
                      json_part:
                        type: string
                        example: "{\"page\":{\"body\":{\"container\":{\"style\":{\"background-color\": #F5F7F9\" } } ... } } }"
                      image:
                        type: object
                        properties:
                          url:
                            type: string
                            example: "https://cdn-m4m.chd01.com/pro/uploads/content_thumbnails/account_11370/123/content_thumbnail.jpg"                   
                      total_pages:
                        type: integer
                        example: 3

      post:
        summary: Create Content Template
        description: |
          Creates a new email content template.
          
          > Note: The "footer_type" field can be set as "default_footer", "custom_footer", or "no_footer". To use account's default custom footer in the content, leave the footer_type field blank.

        tags:
        - Content Templates
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  content_template:
                    type: object
                    properties:
                      name:
                        type: string
                        description: name of the template
                        example: Name of the current template
                      html_part:
                        type: string
                        description: name of the html body
                        example: Html body of the content
                    required:
                    - name
                required:
                - content_template

    "/accounts/:account_id/content_templates/:id.json":
      get:
        summary: Get Content Template
        description: Returns the details of a content template
        tags:
        - Content Templates
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the content template
          example: 716
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 716
                    account_id:
                      type: integer
                      example: 11370
                    name:
                      type: string
                      example: "Single Hero Image"
                    html_part:
                      type: string
                      example: "<html><body> ... </body></html>"
                    editor_ids:
                      type: array
                      items:
                        type: integer
                        example: 1821, 3940
                    owner_id:
                      type: integer
                      example: 13
                    tag_name:
                      type: string
                      example: null
                    created_at:
                      type: date-time
                      example: '2023-05-24T03:42:57.565-04:00'
                    updated_at:
                      type: date-time
                      example: '2023-05-24T03:42:57.565-04:00'
                    folder_id:
                      type: integer
                      example: 23
                    editor_type:
                      type: integer
                      description: 0 = created with the WYSIWYG Editor; 5 = created with the Drag-and-Drop Editor
                      example: 5
                    permissions:
                        type: string
                        example: null
                    json_part:
                      type: string
                      example: "{\"page\":{\"body\":{\"container\":{\"style\":{\"background-color\": #F5F7F9\" } } ... } } }"
                      description: Included only if the template was created using the Drag-and-Drop Editor.
                    image:
                      type: object
                      properties:
                        url:
                          type: string
                          example: "https://cdn-m4m.chd01.com/pro/uploads/content_thumbnails/account_11370/123/content_thumbnail.jpg"                   
                    total_pages:
                      type: integer
                      example: 3
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"
      put:
        summary: Update Content Template
        description: |
           Updates an existing content template.
           
           > Note: Enclose your html in the following format:
           `<html-part> <![CDATA[ <Your HTML> ]]></html-part>`
        tags:
        - Content Templates
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the content template
          example: 716
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  content_template:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Name of the template
                        example: "Hero with 2 side-by-side cells"
                      html_part:
                        type: string
                        description: HTML code of the email content
                        example: "<html><body> ... </body></html>"
                    required:
                    - name
                required:
                - content_template


      delete:
        summary: Delete Content Template
        description: Deletes a content template.
        tags:
        - Content Templates
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the content template
          example: 716
          schema:
            type: integer

    # custom field
    "/accounts/:account_id/custom_fields.json":
      get:
        summary: Get Custom Fields
        description: Returns a list of custom fields and their details
        tags:
        - Custom Fields
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2355
                      name:
                        type: string
                        example: "isMember"
                      field_type:
                        type: string
                        example: boolean
                      account_id:
                        type: integer
                        example: 11370
                      default_value:
                        type: string
                        example: "1"
                      add_to_profile_page:
                        type: boolean
                        example: true
                      display_name:
                        type: string
                        example: "Member"
                      description:
                        type: string
                        example: "Are you a paid member?"
                      created_at:
                        type: date-time
                        example: "2023-05-24T03:42:57.614-04:00"
                      updated_at:
                        type: date-time
                        example: "2023-05-24T03:42:57.614-04:00"
      post:
        summary: Create Custom Field
        description: Creates a new custom field
        tags:
        - Custom Fields
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  custom_field:
                    type: object
                    properties:
                      default_value:
                        type: string
                        description: Default value of the custom field. Boolean values are '0' or '1'.
                        example: "0"
                      field_type:
                        type: string
                        description: Field type of the custom field. Allowed field types include 'string', 'text', 'boolean', 'datetime', 'integer', 'float'
                        example: boolean
                      name:
                        type: string
                        description: Name of the custom field
                        example: "isMember"
                      add_to_profile_page:
                        type: boolean
                        description: Determines if this field appears on the 'Manage Profile' page.
                        example: false
                    required:
                    - name
                    - field_type
                required:
                - custom_field


    "/accounts/:account_id/custom_fields/:id.json":
      get:
        summary: Get Custom Field
        description: Returns the details of a custom field
        tags:
        - Custom Fields
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the custom field
          example: 41970
          schema:
          type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                      id:
                        type: integer
                        example: 2355
                      name:
                        type: string
                        example: "isMember"
                      field_type:
                        type: string
                        example: boolean
                      account_id:
                        type: integer
                        example: 11370
                      default_value:
                        type: string
                        example: "1"
                      add_to_profile_page:
                        type: boolean
                        example: true
                      display_name:
                        type: string
                        example: "Member"
                      description:
                        type: string
                        example: "Are you a paid member?"
                      created_at:
                        type: date-time
                        example: "2023-05-24T03:42:57.614-04:00"
                      updated_at:
                        type: date-time
                        example: "2023-05-24T03:42:57.614-04:00"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"

      put:
        summary: Update Custom Field
        description: Change the name and/or value of a custom field
        tags:
        - Custom Fields
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the custom field
          example: 41970
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  custom_field:
                    type: object
                    properties:
                      default_value:
                        type: string
                        description: Default value of the custom field
                        example: '2012-04-13'
                      name:
                        type: string
                        description: Name of the custom field
                        example: birth_date

      delete:
        summary: Delete Custom Field
        description: Deletes a custom field
        tags:
        - Custom Fields
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the custom field
          example: 41970
          schema:
            type: integer

  #General Do Not Mail list
    "/accounts/:account_id/general_unsubscribes/list.json":
      get:
        summary: Get Contacts (in General DNM List)
        description: Returns a list of all contacts in the General Do Not Mail List
        tags:
        - Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      email:
                        type: string
                        format: email
                        example: johndoe@example.com
                      created_at:
                        type: date-time
                        example: '2023-05-24T23:59:15.335-04:00'
                      reason_type:
                        type: string
                        example: inactive_contact
                      reason_id:
                        type: integer
                        example: 53688
                      uid:
                        type: string
                        example: AB13EZ
                      total_pages:
                        type: integer
                        example: 838

    "/accounts/:account_id/general_unsubscribes.json":
      post:
        summary: Add Contact (to General DNM List)
        description: Adds a contact to the General Do Not Mail List 
        tags:
        - Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Email'
                  - $ref: '#/components/schemas/UID'

    "/accounts/:account_id/general_unsubscribes/email.json":
      get:
        summary: Get Contact (from General DNM List)
        description: Returns a contact from the General Do Not Mail List
        tags:
        - Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: contact[email]
          in: query
          description: _(optional)_ email address of the contact
          example: johndoe@example.com
          schema:
            type: string
        - name: uid
          in: query
          description: _(optional)_ Unique ID of the contact
          example: AB13EZ
          schema:
            type: string
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    account_id:
                      type: integer
                      example: 11370
                    email:
                      type: string
                      format: email
                      example: johndoe@example.com
                    created_at:
                      type: date-time
                      example: '2023-05-29T05:56:07.895-04:00'
                    reason_type:
                      type: string
                      example: inactive_contact
                    reason_id:
                      type: integer
                      example: 53688
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  oneOf:
                    - $ref: '#/components/schemas/email_not_found'
                    - $ref: '#/components/schemas/uid_not_found'

    "/accounts/:account_id/general_unsubscribes/delete.json":
      delete:
        summary: Delete Contact (from General DNM List)
        description: Removes a contact from the General Do Not Mail List, allowing the contact to resume receiving emails 
        tags:
        - Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: email
          in: query
          description: _(optional)_ email of the contact
          example: johndoe@example.com
          schema:
            type: string
        - name: uid
          in: query
          description: _(optional)_ Unique Identifier of the contact
          example: AB13EZ
          schema:
            type: string

  #Brands Do Not Mail List
    "/accounts/:account_id/brand_unsubscribes.json":
      get:
        summary: Get Contacts (in Brands' DNM Lists)
        description: Returns a list of contacts in the Brands Do Not Mail list 
        tags:
        - Brands Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 30
                      account_id:
                        type: integer
                        example: 11370
                      email:
                        type: string
                        example: "johndoe@example.com"
                      brand_id:
                        type: integer
                        example: 1
                      created_at:
                        type: date-time
                        example: '2023-06-01T03:20:43.168-04:00'
                      uid:
                        type: string
                        example: "AB13EZ"
                      total_pages:
                        type: integer
                        example: 418

      post:
        summary: Add Contact (to Brand's DNM list)
        description: |
          Adds a contact to a specific Brand's Do Not Mail List.

          You can use brand-id or brand-name, but either of two is required to add an email to Brand's DNM list.
        tags:
        - Brands Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/email'
                  - $ref: '#/components/schemas/uid'

    "/accounts/:account_id/brand_unsubscribes/email.json":
      get:
        summary:  Get Contact (from Brand's DNM List)
        description: |
          Returns a contact from a Brand's Do Not Mail List. You can query by any of the following options:
          * Email address
          * Unique Identifier
          * Email address AND Brand name
          * Unique Identifier AND Brand name
        tags:
        - Brands Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID 
          example: 11370
          schema:
            type: integer
        - name: email
          in: query
          description: _(optional)_ Contact's email address
          example: "johndoe@example.com"
          schema:
            type: string
        - name: uid 
          in: query
          description: _(optional)_ Contact's Unique Identifier
          example: "AB13EZ"
          schema:
            type: string
        - name: brand
          in: query
          description: _(optional)_ The Brand's name
          example: "ABC Brand"
          schema:
            type: string
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 30
                      account_id:
                        type: integer
                        example: 11370
                      email:
                        type: string
                        example: "johndoe@example.com"
                      brand_id:
                        type: integer
                        example: 1
                      created_at:
                        type: date-time
                        example: '2023-06-01T03:20:43.168-04:00'
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Contact not present"
                    status:
                      type: integer
                      example: 404

    "/accounts/:account_id/brand_unsubscribes/delete.json":
      delete:
        summary: Delete Contact (from Brand's DNM List)
        description: |
          You can remove a contact from a Brand's Do Not Mail List by providing any of the following options:
          * Email address
          * Unique Identifier
          * Email address AND Brand name
          * Unique Identifier AND Brand name

          If you do not provide a Brand name, then the contact will be removed from every Brand's Do Not Mail List.
        tags:
        - Brands Do Not Mail List
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: email
          in: query
          description: Contact's email address
          example: "johndoe@example.com"
          schema:
            type: string
        - name: uid 
          in: query
          description: Contact's Unique Identifier
          example: "AB13EZ"
          schema:
            type: string
        - name: brand 
          in: query
          description: _(optional)_ The Brand's name
          example: "ABC Brand"
          schema:
            type: string
        responses:
          '204':
            description: Successful operation



  #Contact Tags
    "/accounts/:account_id/tags.json":
      get:
        summary: Get Contact Tags
        description: Returns a list of Contact Tags and their details
        tags:
        - Contact Tags
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: name
          in: query
          description: _(optional)_ The URL-encoded name of the Contact Tag
          example: "30-day%20Buyer"
          schema:
            type: string
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 30
                      name:
                        type: string
                        example: "30-day Buyer"
                      account_id:
                        type: integer
                        example: 11370
                      created_at:
                        type: date-time
                        example: "2023-05-24T23:59:15.325-04:00"
                      updated_at:
                        type: date-time
                        example: "2023-05-24T23:59:15.325-04:00"
                      folder_id:
                        type: integer
                        example: 321
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Tag is not present!"

      post:
        summary: Create Contact Tag
        description: Creates a Contact Tag
        tags:
        - Contact Tags
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  tag:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "15-day Buyer"
                    required:
                      - name  
                required:
                - tag

    "/accounts/:account_id/tags/:id.json":
      get:
        summary: Get Contact Tag
        description: Returns a Contact Tag's details
        tags:
        - Contact Tags
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID.
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Contact Tag
          example: 30
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                      id:
                        type: integer
                        example: 30
                      name:
                        type: string
                        example: "30-day Buyer"
                      account_id:
                        type: integer
                        example: 11370
                      created_at:
                        type: date-time
                        example: "2023-05-24T23:59:15.325-04:00"
                      updated_at:
                        type: date-time
                        example: "2023-05-24T23:59:15.325-04:00"
                      folder_id:
                        type: integer
                        example: 321
                      contacts:
                        type: integer
                        description: The total count of contacts having this Contact Tag
                        example: 3023

          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Tag is not present!"

      delete:
        summary: Delete Contact Tag
        description: Deletes a Contact Tag
        tags:
        - Contact Tags
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Contact Tag
          example: 30
          schema:
            type: integer
        responses:
          '204':
            description: Successful Operation

    "/accounts/:account_id/add_remove_tags.json":
      put:
        summary: Add/Remove Contact Tag
        description: Adds and removes Contact Tags to an Email Contact
        tags:
        - Contact Tags
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  tags:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                        example: tester@gmail.com
                      add_tags:
                        type: array
                        items:
                          - type: string
                            example: "red"
                          - type: string
                            example: "blue"
                      remove_tags:
                        type: array
                        items:
                          - type: string
                            example: "magenta"
                          - type: string
                            example: "indigo"
                    required:
                      - email
                required:
                - tags


  # secure lists
    "/accounts/:account_id/secure_lists.json":
      get:
        summary: Get Secure Lists
        description: Returns a list of Secure Lists
        tags:
        - Secure Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 255
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: UnsubCentral Opt-outs
                      contacts_count:
                        type: integer
                        example: 8686
                      refreshed_at:
                        type: string
                        format: date-time
                        example: '2023-05-24T12:00:12.187-04:00'
                      created_at:
                        type: date-time
                        example: '2023-05-24T12:00:12.187-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-05-24T12:00:12.187-04:00'


      post:
        summary: Create Secure List
        description: Creates a new list containing MD5-hashed email addresses
        tags:
        - Secure Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  secure_list:
                    type: object
                    properties:
                      name:
                        type: string
                        example: UnsubCentral Opt-outs
                    required:
                      - name

    "/accounts/:account_id/secure_lists/:id.json":
      get:
        summary: Get Secure List
        description: Returns the details of a Secure List
        tags:
        - Secure Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Secure List
          example: 255
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 255
                    account_id:
                      type: integer
                      example: 11370
                    name:
                      type: string
                      example: UnsubCentral Opt-outs
                    contacts_count:
                      type: integer
                      example: 8686
                    refreshed_at:
                      type: date-time
                      example: '2023-05-24T12:00:12.187-04:00'
                    created_at:
                      type: date-time
                      example: '2023-05-24T12:00:12.187-04:00'
                    updated_at:
                      type: date-time
                      example: '2023-05-24T12:00:12.187-04:00'


      put:
        summary: Update Secure List
        description: Updates the name of a Secure List
        tags:
        - Secure Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Secure List
          example: 255
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  secure_list:
                    type: object
                    properties:
                      name:
                        type: string
                        example: My Secure List
                    required:
                      - name

      delete:
        summary: Delete Secured List
        description: Deletes a Secured List
        tags:
        - Secure Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Secured List
          example: 255
          schema:
            type: integer

    "/accounts/:account_id/secure_lists/:id/import.json":
      post:
        summary: Import Secured List
        description: |
          * To import from a file with a header row, include the **column_name** attribute.
          * To import from a file without a header row, include the **column_number** attribute. Number the columns from left to right.
        tags:
        - Secure Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Secure List
          example: 223
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  secure_list:
                    type: object
                    properties:
                      ftp_file:
                        type: string
                        example: md5list.cv
                      ftp_delimiter:
                        type: string
                        example: comma
                      column_name:
                        type: string
                        example: secure_email
                      column_number:
                        type: string
                        example: "2"
                    required:
                      - ftp_file
                      - ftp_delimiter
                      - column_name
                      - column_number

  # content image
    "/accounts/:account_id/content_images/upload.json":
      post:
        summary: Upload Content Image
        description: |
          * image_url must be a valid URL
          * You can add an image of .PNG, .JPG, .JPEG, or .GIF type up to a maximum of 2 MB size.
        tags:
        - Content Image
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  content_image:
                    type: object
                    properties:
                      image_url:
                        type: string
                        description: url of the image you want to upload
                        example: 'http://example.com/path/to/image.jpg'
                        format: url
                      folder_id:
                        type: integer
                        description: id of the folder you want to store data in
                        example: 20
                    required:
                    - image_url
                required:
                - content_image



  #Relational_Tables
    "/accounts/:account_id/relational_tables.json":
      get:
        summary: Get Relational Tables
        description: Returns a list of Relational Tables and their meta data
        tags:
        - Relational Tables
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 223
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: "pets"
                      contact_sync_type:
                        type: string
                        example: "create_new_contacts"
                        description: "Possible values — do_not_sync, create_new_contacts. Applicable only for Custom UID Accounts."
                      synced_at:
                        type: date-time
                        example: "2024-07-11T11:24:15.000-04:00"
                      refreshed_at:
                        type: date-time
                        example: "2024-07-11T11:24:15.000-04:00"
                      contacts_count:
                        type: integer
                        example: 135094
                      folder_id:
                        type: integer
                        example: 224
                      created_at:
                        type: date-time
                        example: '2023-06-04T13:00:18.889-04:00'
                      updated_at:
                        type: date-time
                        example: '2024-07-04T13:00:18.889-04:00'
                      relational_columns:
                        type: array
                        items:
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 14
                              account_id:
                                type: integer
                                example: 11370
                              relational_table_id:
                                type: integer
                                example: 1319
                              name:
                                type: string
                                example: "pet_id"
                              data_type:
                                type: string
                                example: "integer"
                              default_value:
                                type: string
                                example: ""
                              field_length:
                                type: integer
                                example: 12
                              auto_increment:
                                type: boolean
                                example: true
                              primary_key:
                                type: boolean
                                example: true
                              allow_null:
                                type: boolean
                                example: false
                              sendable:
                                type: boolean
                                example: false
                              key:
                                type: string
                                example: unique
                              is_mapped:
                                type: boolean
                                example: false
                                description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                              created_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'
                              updated_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 15
                              account_id:
                                type: integer
                                example: 11370
                              relational_table_id:
                                type: integer
                                example: 1319
                              name:
                                type: string
                                example: "pet_name"
                              data_type:
                                type: string
                                example: "text"
                              default_value:
                                type: string
                                example: "My Pet"
                              field_length:
                                type: integer
                                example: 255
                              auto_increment:
                                type: boolean
                                example: false
                              primary_key:
                                type: boolean
                                example: false
                              allow_null:
                                type: boolean
                                example: false
                              sendable:
                                type: boolean
                                example: false
                              key:
                                type: string
                                example: none
                              is_mapped:
                                type: boolean
                                example: false
                                description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                              created_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'
                              updated_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'  

      post:
        summary: Create Relational Table
        description: |
          Creates a new relational table

          **Note: New fields have been added to the Relational Table creation API.**

          - **contact_sync_type**: Possible values are:
            - `do_not_sync`
            - `create_new_contacts`

          - **is_mapped**: This can be `true` or `false`. When set to `true`, only columns with
            `email`, `uid`, or `phone` data-types are considered. These columns will be used to sync contacts.

          _These fields are applicable only for Custom UID Accounts._
        tags:
        - Relational Tables
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  relational_table:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Can only be lowercase letters, numbers, and underscores.
                        example: pets
                      contact_sync_type:
                        type: string
                        example: "create_new_contacts"
                        description: "Possible values — do_not_sync, create_new_contacts. Applicable only for Custom UID Accounts."
                      relational_columns_attributes:
                        type: array
                        items:
                        - type: object
                          properties:
                            name:
                              type: string
                              description: Can only be lowercase letters, numbers, and underscores.
                              example: pet_id
                            data_type:
                              type: string
                              description: Acceptable data types include "bigint", "boolean", "datetime", "email", "uid", "float", "integer", "string", or "text". See [Creating Relational Tables](https://galaxy.maropost.com/s/article/Creating-Relational-Tables)
                              example: integer
                            default_value:
                              type: string
                              example: ""
                            field_length:
                              type: integer
                              example: 12
                            key:
                              type: string
                              description: The default value is "none".  Other values are "index", or "unique".
                              example: unique
                            is_mapped:
                              type: boolean
                              example: false
                              description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                            allow_null:
                              type: boolean
                              example: false
                            auto_increment:
                              type: boolean
                              example: true
                            primary_key:
                              type: boolean
                              example: true                              
                            sendable:
                              type: boolean
                              example: false
                          required:
                            - name
                            - data_type
                        - type: object
                          properties:
                            name:
                              type: string
                              description: Can only be lowercase letters, numbers, and underscores.
                              example: pet_owner
                            data_type:
                              type: string
                              example: email
                            default_value:
                              type: string
                              example: ""
                            field_length:
                              type: integer
                              example: 255
                            key:
                              type: string
                              example: None
                            is_mapped:
                              type: boolean
                              example: true
                              description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                            allow_null:
                              type: boolean
                              example: false
                            auto_increment:
                              type: boolean
                              example: false
                            primary_key:
                              type: boolean
                              example: false                              
                            sendable:
                              type: boolean
                              example: true
                          required:
                            - name
                            - data_type
                    required:
                      - name
                      - relational_columns_attributes
                  

    "/accounts/:account_id/relational_tables/:id.json":
      get:
        summary: Get Relational Table
        description: Returns meta data for a Relational Table
        tags:
        - Relational Tables
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the relational table
          example: 223
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 223
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: "pets"
                      contact_sync_type:
                        type: string
                        example: "create_new_contacts"
                        description: "Possible values — do_not_sync, create_new_contacts. Applicable only for Custom UID Accounts."
                      synced_at:
                        type: date-time
                        example: "2024-07-11T11:24:15.000-04:00"
                      refreshed_at:
                        type: date-time
                        example: "2024-07-11T11:24:15.000-04:00"
                      contacts_count:
                        type: integer
                        example: 135094
                      folder_id:
                        type: integer
                        example: 224
                      created_at:
                        type: date-time
                        example: '2023-06-04T13:00:18.889-04:00'
                      updated_at:
                        type: date-time
                        example: '2024-07-04T13:00:18.889-04:00'
                      relational_columns:
                        type: array
                        items:
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 14
                              account_id:
                                type: integer
                                example: 11370
                              relational_table_id:
                                type: integer
                                example: 1319
                              name:
                                type: string
                                example: "pet_id"
                              data_type:
                                type: string
                                example: "integer"
                              default_value:
                                type: string
                                example: ""
                              field_length:
                                type: integer
                                example: 12
                              auto_increment:
                                type: boolean
                                example: true
                              primary_key:
                                type: boolean
                                example: true
                              allow_null:
                                type: boolean
                                example: false
                              sendable:
                                type: boolean
                                example: false
                              key:
                                type: string
                                example: unique
                              is_mapped:
                                type: boolean
                                example: false
                                description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                              created_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'
                              updated_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 15
                              account_id:
                                type: integer
                                example: 11370
                              relational_table_id:
                                type: integer
                                example: 1319
                              name:
                                type: string
                                example: "pet_name"
                              data_type:
                                type: string
                                example: "text"
                              default_value:
                                type: string
                                example: "My Pet"
                              field_length:
                                type: integer
                                example: 255
                              auto_increment:
                                type: boolean
                                example: false
                              primary_key:
                                type: boolean
                                example: false
                              allow_null:
                                type: boolean
                                example: false
                              sendable:
                                type: boolean
                                example: false
                              key:
                                type: string
                                example: none
                              is_mapped:
                                type: boolean
                                example: false
                                description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                              created_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'
                              updated_at:
                                type: date-time
                                example: '2023-06-04T13:00:18.889-04:00'  


      put:
        summary: Update Relational Table
        description: Updates the meta data of a Relational Table
        tags:
        - Relational Tables
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the relational table
          example: 110
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  relational_table:
                    type: object
                    properties:
                      name:
                        type: string
                        example: pets
                      contact_sync_type:
                        type: string
                        example: "create_new_contacts"
                        description: "Possible values — do_not_sync, create_new_contacts. Applicable only for Custom UID Accounts."
                      relational_columns_attributes:
                        type: array
                        items:
                        - type: object
                          properties:
                            name:
                              type: string
                              example: pet_id
                            data_type:
                              type: string
                              example: integer
                            default_value:
                              type: string
                              example: ""
                            field_length:
                              type: integer
                              example: 12
                            key:
                              type: string
                              example: Unique
                            is_mapped:
                              type: boolean
                              example: false
                              description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                            allow_null:
                              type: boolean
                              example: false
                            auto_increment:
                              type: boolean
                              example: true
                            primary_key:
                              type: boolean
                              example: true                              
                            sendable:
                              type: boolean
                              example: false
                          required:
                            - name
                            - data_type
                        - type: object
                          properties:
                            name:
                              type: string
                              example: pet_owner
                            data_type:
                              type: string
                              example: email
                            default_value:
                              type: string
                              example: ""
                            field_length:
                              type: integer
                              example: 255
                            key:
                              type: string
                              example: None
                            is_mapped:
                              type: boolean
                              example: true
                              description: "Set to true for columns with email, phone or uid data-types to enable contact syncing. Applicable only for Custom UID Accounts."
                            allow_null:
                              type: boolean
                              example: false
                            auto_increment:
                              type: boolean
                              example: false
                            primary_key:
                              type: boolean
                              example: false                              
                            sendable:
                              type: boolean
                              example: true
                          required:
                            - name
                            - data_type
                    required:
                      - name
                      - relational_columns_attributes

    

      delete:
        summary: Delete Relational Table
        description: Deletes a Relational Table and all of its records
        tags:
        - Relational Tables
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Relational Table
          example: 223
          schema:
            type: integer


    "/accounts/:account_id/relational_tables/:id/truncate.json":
      get:
        summary: Truncate Relational Table
        description: Deletes all records from the relational table without deleting the table
        tags:
        - Relational Tables
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the Relational Table
          example: 110
          schema:
            type: integer


    #Journeys
    "/accounts/:account_id/journeys.json":
      get:
        summary: Get Journeys
        description: Returns a list of all Journeys
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: Journey Test
                      active:
                        type: boolean
                        example: true
                      retrigger:
                        type: boolean
                        example: false
                      folder_id:
                        type: integer
                        example: 1
                      total_pages:
                        type: integer
                        example: 1
                      created_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.440-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.440-04:00'
    
    "/accounts/:account_id/journeys/:journey_id/journey_contacts.json":
      get:
        summary: Get Journey Contacts
        description: Returns a list of all contacts that have entered a specific Journey
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey from which you are fetching the contacts.
          example: 5
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      journey_id:
                        type: integer
                        example: 5
                      contact_id:
                        type: integer
                        example: 293166
                      email:
                        type: string
                        format: email
                        example: abc@maropost.com
                      uid:
                        type: string
                        example: abcd
                      status:
                        type: string
                        example: active
                      trigger_id:
                        type: integer
                        example: 4
                      journey_item_id:
                        type: integer
                        example: 1
                      journey_end_id:
                        type: integer
                        example: 2
                      total_pages:
                        type: integer
                        example: 1
                      created_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.439-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.439-04:00'
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"
    
    

    "/accounts/:account_id/journeys/:journey_id/journey_campaigns.json":
      get:
        summary: Get Journey Campaigns (from specified Journey)
        description: Returns a list of all campaigns of a specific Journey
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey from which you are fetching the Campaigns.
          example: 5
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    "$ref": "#/components/schemas/campaign"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "No Campaigns found"


    "/accounts/:account_id/journeys/all_journey_campaigns.json":
      get:
        summary: Get Journey Campaigns
        description: Returns a list of all Journey Campaigns
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    "$ref": "#/components/schemas/campaign"
                    
    "/accounts/:account_id/journeys/stop_all_journeys.json":
      put:
        summary: Stop All Journeys
        description: |
            Stops the specified Contact from continuing any further in every Journey that it is flowing through
            
            > **NOTE**:
            >  * For customers using their own UID, the API call with Email Address can trigger multiple contacts.
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: contact_id
          in: query
          description: _(optional)_ The Contact's Marketing Cloud Contact ID
          example: 10099
          schema:
            type: integer
        - name: email
          in: query
          description: _(optional)_ The Contact's email address
          example: johndoe@example.com
          schema:
            type: string
            format: email
        - name: uid
          in: query
          description: _(optional)_ The Contact's Unique Identifier
          example: AB13EZ
          schema:
            type: string

    "/accounts/:account_id/journeys/:journey_id/stop/:contact_id.json":
      put:
        summary: Pause Journey
        description: Pauses a contact's flow through a Journey
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey
          schema:
            type: integer
        - name: contact_id
          in: path
          description: The ID of the contact to be paused
          schema:
            type: integer
    
    "/accounts/:account_id/journeys/:journey_id/stop/uid.json":
      put:
        summary: Pause Journey (Using Contact's UID)
        description: Pauses a contact's flow through a Journey by referencing its Unique Identifier
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey
          schema:
            type: integer
        - name: uid
          in: query
          description: The contact's Unique Identifier
          example: AB13EZ
          schema:
            type: string

    "/accounts/:account_id/journeys/:journey_id/start/:contact_id.json":
      put:
        summary: Restart Journey
        description: |
            Restarts a Contact's flow through a Journey

            > **NOTE**: Ensure that the Journey's "Retrigger Journey" option is enabled.
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey
          schema:
            type: integer
        - name: contact_id
          in: path
          description: The ID of the Contact
          schema:
            type: integer
    
    "/accounts/:account_id/journeys/:journey_id/start/uid.json":
      put:
        summary: Restart Journey (Using Contact's UID)
        description: |
            Restarts a Contact's flow through a Journey by referencing its Unique Identifier

            > **NOTE**: Ensure that the Journey's "Retrigger Journey" option is enabled.
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey that is to be restarted
          schema:
            type: integer
        - name: uid
          in: query
          description: The Contact's Unique Identifier
          example: AB13EZ
          schema:
            type: string

    "/accounts/:account_id/journeys/:journey_id/reset/:contact_id.json":
      put:
        summary: Reset Journey
        description: |
          Returns the Contact to the beginning of the Journey.

          > **NOTE:** Resetting a contact to the beginning of the Journey will result in sending the same Journey campaigns that were originally sent to that Contact.
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey
          schema:
            type: integer
        - name: contact_id
          in: path
          description: The ID of the Contact
          schema:
            type: integer
    
    "/accounts/:account_id/journeys/:journey_id/reset/uid.json":
      put:
        summary: Reset Journey (Using Contact's UID)
        description:  |
          Returns the Contact to the beginning of the Journey by referencing its Unique Identifier.

          > **NOTE:** Resetting a contact to the beginning of the Journey will result in sending the same Journey campaigns that were originally sent to that Contact.
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey
          schema:
            type: integer
        - name: uid
          in: query
          description: The Contact's Unique Identifier
          example: AB13EZ
          schema:
            type: string
  

    "/accounts/:account_id/journeys/:journey_id/reset_contact_status.json":
      put:
        summary: Update Journey Status
        description: |
            Updates a Contact's status in a Journey from **Unsubscribed** to **Finished**
            
            > **NOTE**:
            >  * Updating a contact's status from **Unsubscribed** to **Finished** enables it to re-enter the Journey.
            >  * The contact's status is **NOT** changed if it is already marked as SPAM or HARD BOUNCED.
            >  * For customers using their own UID, the API call with Email Address can trigger multiple contacts.
        tags:
        - Journeys
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: journey_id
          in: path
          description: The ID of the Journey
          schema:
            type: integer
        - name: email
          in: query
          description: The Contact's email address
          example: johndoe@example.com
          schema:
            type: string
            format: email
    
    
  # Email Contacts    
    "/accounts/:account_id/contacts/email.json":
      get:
        summary: Get Contact
        description: Returns the attributes of the specified Email Contact
        tags:
        - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: contact[email]
          in: query
          description: The Email Contact's email address
          example: johndoe@example.com
          schema:
            type: string
        - name: uid
          in: query
          description:
            _(optional)_ The Email Contact's Unique Identifier
          schema:
            type: string

        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/contact"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Contact is not present!"

    "/accounts/:account_id/contacts.json":
      post:
        summary: Create Contact
        description: |
          Creates a contact in Marketing Cloud independent of any list subscription.

          This method acts as an UPSERT action using the email address and the phone number as lookup keys.
            - The POST payload must include either the `email` and/or `phone` attributes.
            - If **both** the email address *and* the phone number do not exist, then a new Contact is created.
            - If **either** the email address or the phone number exists, then the existing Contact is updated per the POST payload.
            - The `uid` attribute is required in the POST payload for Custom UID accounts only.
            - The `phone` attribute must include a country code, else it will be ignored.
                      
          If you're unsure whether your account is a Custom UID account, please check with your account administrator.
        tags:
          - Contacts
        security:
          - ApiKey: []
        parameters:
          - name: account_id
            in: path
            description: Marketing Cloud Account ID.
            example: 11370
            schema:
              type: integer
        requestBody:
          content:
            application/json:
              schema:
                type: object
                required:
                  - contact
                properties:
                  contact:
                    type: object
                    required:
                      - email
                      - phone
                      - uid
                    properties:
                      email:
                        type: string
                        example: "johndoe@example.com"
                        description: |
                          The contact’s email address.
                          - **Note**: You must provide either the `email` or the `phone` attribute.
                      phone:
                        type: string
                        description: |
                          The contact’s phone number.
                          - **Note**: You must provide either the `email` or the `phone` attribute.
                        example: "1234567890"
                      uid: 
                        type: string
                        example: "AB1234"
                        description: |
                          The contact's Unique Identifier as provided by your CRM. 
                          - **Note**: This attribute is required **only** for Custom UID accounts.
                      first_name:
                        type: string
                        example: "John"
                        description:
                          The first name of the contact.
                      last_name:
                        type: string
                        example: "Doe"
                        description:
                          The last name of the contact.
                      custom_field:
                        type: object
                        description: |
                          A list of the names of custom fields and their values according to their data types.

                          > **NOTE**: The custom fields must already exist in your account before you can set their values for the contact through the payload.
                        properties:
                          isMember:
                            type: boolean
                            example: true
                          membership_renewal_date:
                            type: date-time
                            example: "2023-05-22T01:48:37.094-04:00"
                          membership_level:
                            type: string
                            example: "Gold Membership"
                      add_tags:
                        type: array
                        description: |
                          The contact tags that you want to assign to the contact.
                          > **Note**: The contact tags must already exist in your account before you can assign them to the contact through payload.
                        items:
                          - type: string
                            example: "magenta"
                            description: "magenta"
                          - type: string
                            example: "indigo"
                            description: "indigo"
                      remove_tags:
                        type: array
                        description: |
                          The contact tags that you want to remove from the contact.
                          For an existing contact, the specified contact tags will be unassigned from the contact.
                        items:
                          - type: string
                            example: "blue"
                            description: "blue"
                          - type: string
                            example: "green"
                            description: "green"
                      remove_from_dnm:
                        type: boolean
                        default: false
                        description: Removes the contact from the General Do Not Email List
                      options:
                        type: object
                        description: Options to set up various subscription preferences of the contact.
                        properties:
                          subscribe_list_ids:
                            type: string
                            description: A comma-separated list of List IDs that you want to subscribe this contact to receive emails.
                            example: "21,23,24"
                          unsubscribe_list_ids:
                            type: string
                            description: A comma-separated list of List IDs that you want to unsubscribe this contact from receiving emails.
                            example: "233,144,55"
                          sms_subscribe_list_ids:
                            type: string
                            description: A comma-separated list of List IDs that you want to subscribe this contact to receive text messages.
                            example: "21,23,24"
                          sms_unsubscribe_list_ids:
                            type: string
                            description: A comma-separated list of List IDs that you want to unsubscribe this contact from receiving text messages.
                            example: "233,144,55"
                          unsubscribe_workflow_ids:
                            type: string
                            description: A comma-separated list of Journey IDs that you want to unsubscribe this contact from.
                            example: "3443,43434"
                          unsubscribe_campaign:
                            type: string
                            description: A comma-separated list of Email Campaign IDs that you want to unsubscribe this contact from.
                            example: "9261, 150934"

    "/accounts/:account_id/contacts/:id.json":
      put:
        summary: Update Contact
        description: Updates the attributes of a Contact. Use this method to update the email address and phone of the contact.
        tags:
          - Contacts
        security:
          - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the contact whose details are to be updated
          example: 47841638
          schema:
            type: integer
        requestBody:
          content:
            application/json:
              schema:
                type: object
                required:
                  - contact
                properties:
                  contact:
                    type: object
                    properties:
                      email:
                        type: string
                        example: "johndoe@example.com"
                        description: The contact’s email address.
                      phone:
                        type: string
                        description: The contact’s phone number.
                        example: "1234567890"
                      uid:
                        type: string
                        example: "AB1234"
                        description: |
                          The contact's Unique Identifier as provided by your CRM.
                      first_name:
                        type: string
                        example: "John"
                        description: The first name of contact.
                      last_name:
                        type: string
                        example: "Doe"
                        description: The last name of contact.
                      custom_field:
                        type: object
                        description: |
                          A list of the names of custom fields and their values according to their data types
                          > **NOTE**: The custom fields must already exist in your account before you can set their values for the contact through the payload.
                        properties:
                          isMember:
                            type: boolean
                            example: true
                          membership_renewal_date:
                            type: date-time
                            example: "2023-05-22T01:48:37.094-04:00"
                          membership_level:
                            type: string
                            example: "Gold Membership"
                      add_tags:
                        type: array
                        description: |
                          The contact tags that you want to assign to the contact. 
                          > **Note**: The contact tags must already exist in your account before you can assign them to the contact through the payload.
                        items:
                          - type: string
                            description: "magenta"
                            example: "magenta"
                          - type: string
                            description: "indigo"
                            example: "indigo"
                      remove_tags:
                        type: array
                        items:
                          - type: string
                            description: "blue"
                            example: "blue"
                          - type: string
                            description: "green"
                            example: "green"
                        description: The contact tags that you want to remove from the contact.

      delete:
        summary: Delete Contact
        description: |
          Removes a contact from one or more Lists

          > **NOTE**: Though the contact is removed from multiple lists, it still exists within your Contact database.
        tags:
        - Email Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer
        - name: list_ids
          in: query
          description: Comma-separated list of Email List IDs
          example: 21,143,203,2331
          schema:
            type: string
          required: true


    "/accounts/:account_id/contacts/uid.json":
      delete:
        summary: Delete Contact (by UID)
        description: |
          Removes a contact from one or more Email Lists referencing it by its Unique Identifier
        
          > **NOTE**: Though the contact is removed from multiple lists, it still exists within your Contact database.  If you need to honor your contact's Right to Erasure, then use **PUT /contacts/pseudonymize.json** instead.
        tags:
        - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: list_ids
          in: query
          description: Comma-separated list of Email List IDs
          example: 21,143,203,2331
          schema:
            type: string
          required: true
        - name: uid
          in: query
          description: An ID that uniquely identifies each contact.
          schema:
            type: string
            example: AB13EZ
            description: "AB13EZ"
          required: true
   
    "/accounts/:account_id/contacts/unsubscribe_all.json":
      put:
        summary: Unsubscribe Contact
        description: Unsubscribes a contact from all Lists.
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer
        - name: contact[email]
          in: query
          description: The email address of the contact
          required: true
          schema:
            type: string
          example: johndoe@example.com
        - name: contact[uid]
          in: query
          required: true
          description: |
            An ID from your CRM that uniquely identifies the contact.
            > **Note**: This parameter is required **only** for Custom UID accounts.
          schema:
            type: string
          example: AB13EZ


    #TODO task for Nancy and discuss, currently commenting this for new uid based users. 
    "/accounts/:account_id/contacts/pseudonymize.json":
      put:
        summary: Erase Contact
        description: |
          Use this method to honor a contact's Right to Erasure. This method deletes all personally identifiable information (PII) of the contact and pseudonymizes the email address.

          Pursuant to Article 89 Paragraph 1 of GDPR, the contact record is retained for statistical purposes.  All other information is removed.

           To learn about contact erasure in Marketing Cloud, see [Exercising the Right to Erasure](https://galaxy.maropost.com/s/article/Exercising-the-Right-to-Erasure).
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer
        - name: email
          in: query
          required: true
          description: The email address of the contact that is to be erased.
          example: johndoe@example.com
          schema:
            type: string

    "/accounts/:account_id/contacts/delete_all.json":
      delete:
        summary: Delete Contact (from all Lists)
        description: |
          Removes a contact from all Lists
          > **NOTE**: Though the contact is removed from multiple lists, it still exists within your Contact database.  If you need to honor your contact's Right to Erasure, then use **PUT /contacts/pseudonymize.json** instead.          
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer
        - name: email
          in: query
          required: true
          description: The contact's email address
          example: johndoe@example.com
          schema:
            type: string
        - name: uid
          in: query
          required: true
          description: |
            An ID from your CRM that uniquely identifies the contact.
            > **Note**: This parameter is required **only** for Custom UID accounts.
          schema:
            type: string
          example: AB13EZ


    "/accounts/:account_id/lists/:list_id/contacts.json":
      get:
        summary: Get Contacts (from List)
        description: Returns all  Contacts from the specified List
            
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: sort_field
          in: query
          description: |
            _(optional)_ Returns the Contacts sorted in the specified order. The only acceptable value is **contacts**.  When provided, then the **sort_by** and the **method** query string parameters are required.

            If not provided, then the Contacts are sorted by their subscription status.
          schema:
            type: string
          example: contacts
        - name: sort_by
          in: query
          description: Required if **sort_field** is provided in the query string. The only acceptable values are **asc** and **desc** indicating sort in ascending order or descending order respectively.
          schema:
            type: string
          example: desc 
        - name: method
          in: query
          description: Required if **sort_field** is provided in the query string. The value of this parameter is the name of the attribute that you want the result set sorted by.
          schema:
            type: string
          example: created_at
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: The Contact's ID assigned by Marketing Cloud
                        example: 42817337
                      account_id:
                        type: integer
                        example: 11370
                      email:
                        type: string
                        format: email
                        example: johndoe@example.com
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Doe
                      created_at:
                        type: date-time
                        example: '2023-05-22T01:48:37.094-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-05-22T01:48:37.094-04:00'
                      engagement_score:
                        description: A value automatically calculated based on the contact's brand engagment including site visits and email responses.
                        type: number
                        example: 323
                      rfm_score:
                        description: A value automatically calculated based on the contact's purchase history.
                        type: number
                        example: 5
                      uid:
                        type: string
                        description: The Contact's Unique Identifier.
                        example: AB13EZ
                      phone:
                        type: string
                        example: "1234567890"
                      custom_field_boolean:
                        type: boolean
                        example: false
                      custom_field_datetime:
                        type: date-time
                        example: '2023-05-23T01:47:00.687-04:00'
                      custom_field_string:
                        type: string
                        example: "Gold Membership"
                      pseudonymize_contact:
                        description: If `true` then this contact has been Erased.
                        default: false
                        type: boolean
                        example: false
                      email_subscription:
                        type: string
                        example: Subscribed
                      email_subscription_created_at:
                        type: date-time
                        example: '2023-05-23T01:47:00.687-04:00'
                      email_subscription_updated_at:
                        type: date-time
                        example: '2023-05-23T01:47:00.687-04:00'
                      sms_subscription:
                        type: string
                        example: Subscribed
                      sms_subscription_created_at:
                        type: date-time
                        example: '2023-05-23T01:47:00.687-04:00'
                      sms_subscription_updated_at:
                        type: date-time
                        example: '2023-05-23T01:47:00.687-04:00'

          '404':
            description: "Not Found"
            content:
              application/json:
                schema: 
                  type: object
                  properties: 
                    errors:
                      type: object
                      properties:
                        base:
                          type: array
                          items:
                            type: string
                            example: "not_found"  
      
      post:
        summary: Create Contact (in List)
        description: |
          Adds a Contact to the specified List.

          This method acts as an UPSERT action using the email address and the phone number as lookup keys.
          - The POST payload must include either the `email` and/or `phone` attributes.
          - If **both** the email address *and* the phone number do not exist, then a new Contact is created.
          - If **either** the email address or the phone number exists, then the existing Contact is updated per the POST payload.
          - The `uid` attribute is required in the POST payload for Custom UID accounts only.
          - The `phone` attribute must include a country code, else it will be ignored.

          If you're unsure whether your account is a Custom UID account, please check with your account administrator.

        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: list_id
          in: path
          description: The ID of the List to which the Contact is added.
          example: 21
          schema:
            type: integer       
        requestBody:
          content:
            application/json:
              schema:
                type: object
                required:
                  - contact
                properties:
                  contact:
                    type: object
                    required:
                      - email
                      - phone
                      - uid
                    properties:
                      email:
                        type: string
                        required: true
                        example: "johndoe@example.com"
                        description: |
                          The contact’s email address.
                          - **Note**: You must provide either the `email` or the `phone` atrribute.
                      phone:
                        type: string
                        required: true
                        description: |
                          The contact’s phone number.
                          - **Note**: You must provide either the `email` or the `phone` atrribute.
                        example: "1234567890"
                      uid: 
                        type: string
                        required: true
                        example: "AB1234"
                        description: |
                          The contact's Unique Identifier as provided by your CRM.
                          - **Note**: This attribute is required **only** for Custom UID accounts.
                      first_name:
                        type: string
                        example: "John"
                        description:
                          The first name of the contact.
                      last_name:
                        type: string
                        example: "Doe"
                        description:
                          The last name of the contact.
                      custom_field:
                        type: object
                        description: |
                          A list of the names of custom fields and their values according to their data types.

                          > **NOTE**: The custom fields must already exist in your account before you can set their values for the contact through the payload.
                        properties:
                          isMember:
                            type: boolean
                            example: true
                          membership_renewal_date:
                            type: date-time
                            example: "2023-05-22T01:48:37.094-04:00"
                          membership_level:
                            type: string
                            example: "Gold Membership"
                      add_tags:
                        type: array
                        description: |
                          The contact tags that you want to assign to the contact.
                          > **Note**: The contact tags must already exist in your account before you can assign them to the contact through the payload.
                        items:
                          - type: string
                            example: "magenta"
                            description: "magenta"
                          - type: string
                            example: "indigo"
                            description: "indigo"
                      remove_tags:
                        type: array
                        description: |
                          The contact tags that you want to remove from the contact. For an existing contact, the specified contact tags will be unassigned from the contact.
                        items:
                          - type: string
                            example: "blue"
                            description: "blue"
                          - type: string
                            example: "green"
                            description: "green"
                      remove_from_dnm:
                        type: boolean
                        default: false
                        description: Removes the contact from the General Do Not Emil List
                      subscribe:
                        type: boolean
                        description: |
                          If not included in the POST payload, the contact (as identified by its email address) will be automatically subscribed to receive emails sent to the specified list if an email subscription record does not previously exist. Otherwise, its subscription status remains unchanged.
                          - **true**: explicitly subscribe this contact to receive emails sent to the specified list.
                          - **false**: explicitly unsubscribe this contact from receiving emails sent to the specified list.
                        example: true
                      sms_subscribe: 
                        type: boolean
                        description: |
                          If not included in the POST payload, the contact (as identified by its phone number) will be automatically subscribed to receive text messages sent to the specified list if a SMS subscription record does not previously exist. Otherwise, its subscription status remains unchanged.
                          - **true**: explicitly subscribe this contact to receive text messages sent to the specified list.
                          - **false**: explicitly unsubscribe this contact from receiving text messages sent to the specified list.
                        example: true

    "/accounts/:account_id/lists/:list_id/contacts/:id.json":
      get:
        summary: Get Contact (in List)
        description: Returns the attributes of the specified contact from the specified List
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: list_id
          in: path
          description: The List Id of the contact.
          example: 17
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the contact whose details are to be fetched.
          example: 47841638
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/contact"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Contact is not present!"

    
      put:
        summary: Update Contact (in List)
        # change is needed here
        description: Updates the attributes of a Contact.  Use this method to update the email address and phone of the contact.
        tags:
         - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: list_id
          in: path
          description: The ID of the List containing the contact.
          example: 17
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the contact whose details are to be updated.
          example: 47841638
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                required:
                  - contact
                properties:
                  contact:
                    type: object
                    properties:
                      email:
                        type: string
                        example: "johndoe@example.com"
                        description: The contact’s email address.
                      phone:
                        type: string
                        example: "15558675309"
                        description: The contact’s phone number.
                      uid:
                        type: string
                        description: The contact's Unique Identifier as provided by your CRM.
                        example: "AB13EZ"
                      first_name:
                        type: string
                        example: "John"
                        description: The first name of contact.
                      last_name:
                        type: string
                        example: "Doe"
                        description: The last name of contact.
                      custom_field:
                        type: object
                        description: |
                          A list of the names of custom fields and their values according to their data types.

                          > **NOTE**: The custom fields must already exist in your account before you can set their values for the contact through the payload.
                        properties:
                          isMember:
                            type: boolean
                            example: true
                          membership_renewal_date:
                            type: date-time
                            example: "2023-05-22T01:48:37.094-04:00"
                          membership_level:
                            type: string
                            example: "Gold Membership"
                      add_tags:
                        type: array
                        description: |
                         The contact tags that you want to assign to the contact.
                         > **NOTE**: The custom fields must already exist in your account before you can set their values for the contact through the payload. 
                        items:
                          - type: string
                            example: "magenta"
                          - type: string
                            example: "indigo"
                      remove_tags:
                        type: array
                        description: The contact tags that you want to remove from the contact.
                        items:
                          - type: string
                            example: "blue"
                          - type: string
                            example: "green"
                      subscribe:
                        type: boolean
                        description: |
                          If not included in the PUT payload, the contact (as identified by its email address) will be automatically subscribed to receive emails sent to the specified list if an email subscription record does not previously exist. Otherwise, its subscription status remains unchanged.
                          
                          - **true**: explicitly subscribe this contact to receive emails sent to the specified list.
                          - **false**: explicitly unsubscribe this contact from receiving emails sent to the specified list.
                        example: true
                      remove_from_dnm:
                        type: boolean
                        default: false
                        description: Removes the contact from the General Do Not Email List
                        example: true               
                      sms_subscribe:
                        type: boolean
                        description: |
                          If not included in the PUT payload, the contact (as identified by its phone number) will be automatically subscribed to receive text messages sent to the specified list if a SMS subscription record does not previously exist. Otherwise, its subscription status remains unchanged.

                          - **true**: explicitly subscribe this contact to receive text messages sent to the specified list.
                          - **false**: explicitly unsubscribe this contact from receiving text messages sent to the specified list.

      delete:
        summary: Delete Contact (in List)
        description: |
          Removes an Email Contact from the specified Email List

          > **NOTE**: Though the Email Contact is removed from the List, it still exists within your Contact database. If you need to honor your contact's Right to Erasure, the use **PUT /contacts/pseudonymize.json** instead.
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: list_id
          in: path
          description: The ID of the List containing the contact.
          example: 17
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the contact whose details are to be updated.
          example: 47841638
          schema:
            type: integer


    "/accounts/:account_id/lists/:list_id/contacts/uid.json":
      delete:
        summary: Delete Contact (in List by UID)
        description: |
          Removes a contact from the specified List using the contact's Unique Identifier.

          > **NOTE**: Though the Email Contact is removed from the List, it still exists within your Contact database. If you need to honor your contact's Right to Erasure, the use **PUT /contacts/pseudonymize.json** instead.          
        tags:
          - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer
        - name: list_id
          in: path
          example: 21
          schema:
            type: integer
        - name: uid
          in: query
          required: true
          description: |
            The contact's Unique Identifier as provided by your CRM.
          schema:
            type: string
          example: AB13EZ

    "/accounts/:account_id/contacts/:contact_id/open_report.json":
      get:
        summary: Get Contact Opens
        description: Returns a list of all campaigns that the contact has opened
        tags:
        - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: contact_id
          in: path
          description: The Marketing Cloud ID of the contact for whom the open report is to be fetched.
          example: 7141625
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                  schema:
                    type: array
                    items:
                      type: object
                      properties:
                        campaign_id:
                          type: integer
                          example: 18812
                        contact_id:
                          type: integer
                          example: 7141625
                        browser:
                          type: string
                          example: "Firefox | Windows | Unknown | desktop"
                        ip_address:
                          type: string
                          example: "11.222.333.123"
                        recorded_at:
                          type: date-time
                          example: '2023-05-23T03:56:50.248-04:00'
                        uid:
                          type: string
                          example: AB13EZ
                        total_pages:
                          type: integer
                          example: 4


    "/accounts/:account_id/contacts/:contact_id/click_report.json":
      get:
        summary: Get Contact Clicks
        description: Returns a list of all campaigns that the contact has clicked a link within
        tags:
        - Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: contact_id
          in: path
          description: The Marketing Cloud ID of the contact for whom the click report is to be fetched
          example: 7141625
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 18812
                      contact_id:
                        type: integer
                        example: 7141625
                      url:
                        type: string
                        format: url
                        example: "https://shop.example.com/summer_wear/"
                      browser:
                        type: string
                        example: "Firefox | Windows | Unknown | desktop"
                      ip_address:
                        type: string
                        example: "11.222.333.123"
                      recorded_at:
                        type: date-time
                        example: '2023-05-23T03:56:50.248-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-05-23T03:56:50.248-04:00'
                      created_at:
                        type: date-time
                        example: '2023-05-23T03:56:50.248-04:00'
                      uid:
                        type: string
                        example: "AB13EZ"
                      total_pages:
                        type: integer
                        example: 1

  #Growth & Attrition Reports
    "/v2/:account_id/analytics/custom_reports/:id.json":
      get:
        summary: Get Growth and Attrition Report
        description: Returns the data from a Growth and Attrition report 
        tags:
        -  Growth And Attrition Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: ID of the report.
          example: 41970
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        report:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            account_id:
                              type: integer
                              example: 20000
                            name:
                              type: string
                              example: "Sample GrowthAttrition Report"
                            from:
                              type: string
                              format: date-time
                              example: '2023-05-01'
                            upto:
                              type: string
                              format: date-time
                              example: '2023-05-01'
                            data:
                              type: object
                              properties:
                                detail_data:
                                  type: array
                                  items:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 567
                                        name:
                                          type: string
                                          example: "10janlist"
                                    - type: object
                                      properties:
                                        total:
                                          type: string
                                          example: "Total"
                                aggr_data:
                                  type: object
                                  properties:
                                    subscribed_user_growth_total:
                                      type: integer
                                      example: 2
                                    unsubscribed_user_growth_total:
                                      type: integer
                                      example: 0
                            report_type:
                              type: string
                              example: "growth_attrition"
                            schedule_type:
                              type: integer
                              example: 1
                            rule_match_option:
                              type: integer
                              example: 1
                            email_option:
                              type: boolean
                              example: true
                            send_to_email:
                              type: string
                              example: "jhondoe@gmail.com"
                            send_to_subject:
                              type: string
                              example: "Growth Attrition Report"
                            send_to_comments:
                              type: string
                              example: "PFA Growth and Attrition Report"
                            run_at_option:
                              type: integer
                              example: 4
                            email_file_type:
                              type: integer
                              example: 1
                            run_at_option_value:
                              type: integer
                              example: null
                            run_at_time:
                              type: string
                              example: null
                            enabled:
                              type: boolean
                              example: true
                            day_wise:
                              type: boolean
                              example: false
                            brand_id:
                              type: integer
                              example: null
                            created_at:
                              type: string
                              format: date-time
                              example: '2025-01-27T01:55:42.000-05:00'
                            updated_at:
                              type: string
                              format: date-time
                              example: '2025-01-27T01:55:42.000-05:00'
                            select_options:
                              type: object
                              example: null
                            selected_fields:
                              type: array
                              items:
                                type: string
                              example:
                                - "dnm_total"
                                - "dnm_per_list"
                                - "user_attrition_total"
                                - "user_attrition_per_list"
                                - "subscribed_user_growth_total"
                                - "subscribed_user_growth_per_list"
                                - "unsubscribed_user_growth_total"
                                - "unsubscribed_user_growth_per_list"
                            runtime:
                              type: string
                              format: date-time
                              example: '2023-06-30 23:00:00'
                            time_format:
                              type: integer
                              example: 1
                            isp_fields:
                              type: object
                              example: null
                            criteria:
                              type: object
                              example: {}
                        brand_name:
                          type: string
                          example: null
                        ctag_name:
                          type: string
                          example: null
                        download_links:
                          type: array
                          items:
                            type: object
                            properties:
                              date:
                                type: string
                                example: '27 Jan 2025'
                              link:
                                type: string
                                example: '/accounts/20001/analytics/custom_reports/464/download?notification_id=5695'
                        sms_campaigns:
                          type: object
                          example: {}
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    error:
                      type: string
                      example: "Report not found"

    "/v2/:account_id/analytics/custom_reports.json":
      post:
        summary: Create Growth and Attrition report
        description: Creates a new Growth and Attrition report
        tags:
        -  Growth And Attrition Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        requestBody:
           content:
              application/json:
                schema:
                  type: object
                  properties:
                    report:
                      type: object
                      properties:
                        report_type:
                          type: string
                          example: growth_attrition
                        name:
                          type: string
                          example: Sample GrowthAttrition Report
                        from:
                          type: string
                          format: date-time
                          example: '2023-05-01'
                        upto:
                          type: string
                          format: date-time
                          example: '2023-05-01'
                        selected_fields:
                          type: array
                          items:
                             type: string
                          example:
                            - "dnm_total"
                            -  "dnm_per_list"
                            -  "user_attrition_total"
                            -  "user_attrition_per_list"
                            -  "subscribed_user_growth_total"
                            -  "subscribed_user_growth_per_list"
                            -  "unsubscribed_user_growth_total"
                            -  "unsubscribed_user_growth_per_list"
                        criteria: 
                          type: object
                          properties: 
                            include_future_lists: 
                              type: boolean
                              example: false
                        email_file_type:
                          type: integer
                          example: 1
                        send_to_email:
                          type: array
                          items:
                            type: string
                            example: jhondoe@gmail.com
                        send_to_subject:
                          type: string
                          example: Growth Attrition Report
                        send_to_comments:
                          type: string
                          example: PFA Growth and Attrition Report
                        email_option:
                          type: boolean
                          example: true
                        schedule_type:
                          type: integer
                          example: 1
                        time_format:
                          type: integer
                          example: 1
                        run_at_option:
                          type: integer
                          example: 4
                        day_wise:
                          type: boolean
                          example: false
                        runtime:
                          type: string
                          format: date-time
                          example: '2025-01-28 12:15 AM'
                        list_ids:
                          type: array
                          items:
                            type: integer
                            example: 1
  #report API
    "/accounts/:account_id/reports/opens.json":
      get:
        summary: Get Email Opens
        description: Returns a list of all Contacts that have opened an email campaign
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: fields
          in: query
          description: The fields passed in the query string will be returned in the response payload.
          example: "membership_level, membership_renewal_date, first_name, last_name, phone"
          schema:
            type: string
        - name: from
          in: query
          description: Start of the date range for email opens in yyyy-mm-dd format.
          example: "2023-01-05"
          schema:
            type: date-time
        - name: to
          in: query
          description: End of the date range for email opens in yyyy-mm-dd format
          example: "2023-01-31"
          schema:
            type: date-time
        - name: unique
          in: query
          default: false
          description:  If set to **true**, then returns only Unique Opens
          example: true
          schema:
            type: boolean
        - name: email
          in: query
          description: Selects the email campaigns opened by a specific email contact, using the email address as the reference
          example: "johndoe@example.com"
          schema:
            type: string
            format: email          
        - name: uid
          in: query
          description: Selects the email campaigns opened by a specific email contact, using the value of the unique identifier field as the reference
          example: "AB13EZ"
          schema:
            type: string     
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/opens_schema"

    "/accounts/:account_id/reports/clicks.json":
      get:
        summary: Get Email Clicks
        description: Returns a list of all Contacts that have clicked a link in an email campaign
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: fields
          in: query
          description: The fields passed in the query string will be returned in the response payload.
          example: "membership_level, membership_renewal_date, first_name, last_name, phone"
          schema:
            type: string
        - name: from
          in: query
          description: Start of the date range for email clicks in yyyy-mm-dd format
          example: "2023-01-05"
          schema:
            type: date-time
        - name: to
          in: query
          description: End of the date range for email clicks in yyyy-mm-dd format
          example: "2023-01-31"
          schema:
            type: date-time
        - name: unique
          in: query
          default: false
          description:  If set to **true**, then returns only Unique Clicks
          example: true
          schema:
            type: boolean
        - name: email
          in: query
          description: Selects the email campaigns clicked by a specific email contact, using the email address as the reference
          example: "johndoe@example.com"
          schema:
            type: string
            format: email          
        - name: uid
          in: query
          description: Selects the email campaigns clicked by a specific email contact, using the value of the unique identifier field as the reference
          example: "AB13EZ"
          schema:
            type: string        
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/clicks_schema"

    "/accounts/:account_id/reports/bounces.json":
      get:
        summary: Get Email Bounces
        description: Returns a list of all Contacts whose emails sent to them have bounced
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: fields
          in: query
          description: The fields passed in the query string will be returned in the response payload.
          example: "membership_level, membership_renewal_date, first_name, last_name, phone"
          schema:
            type: string
        - name: from
          in: query
          description: Start of the date range for email bounces in yyyy-mm-dd format
          example: "2023-01-05"
          schema:
            type: date-time
        - name: to
          in: query
          description: End of the date range for email bounces in yyyy-mm-dd format
          example: "2023-01-31"
          schema:
            type: date-time
        - name: unique
          in: query
          default: false
          description:  If set to **true**, then returns only Unique Bounces
          example: true
          schema:
            type: boolean
        - name: email
          in: query
          description: Selects the email campaigns that bounced when sent to a specific email contact, using the email address as the reference
          example: "johndoe@example.com"
          schema:
            type: string
            format: email          
        - name: uid
          in: query
          description: Selects the email campaigns that bounced when sent to a specific email contact, using the value of the unique identifier field as the reference
          example: "AB13EZ"
          schema:
            type: string 
        - name: type
          in: query
          description: |
            * **soft** – Selects only contacts whose emails sent to them were temporarily rejected by their respective mailbox providers
            * **hard** - Selects only contacts whose emails sent to them were permanently rejected by their respective mailbox providers
          example: hard
          schema:
            type: string
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/bounces_schema"

    "/accounts/:account_id/reports/unsubscribes.json":
      get:
        summary: Get Email Unsubscribes
        description: Returns a list of all Contacts that have unsubscribed from an email campaign
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: fields
          in: query
          description: The fields passed in the query string will be returned in the response payload.
          example: "membership_level, membership_renewal_date, first_name, last_name, phone"
          schema:
            type: string
        - name: from
          in: query
          description: Start of the date range for email unsubscribes in yyyy-mm-dd format
          example: "2023-01-05"
          schema:
            type: date-time
        - name: to
          in: query
          description: End of the date range for email unsubscribes in yyyy-mm-dd format
          example: "2023-01-31"
          schema:
            type: date-time
        - name: unique
          in: query
          default: false
          description:  If set to **true**, then returns only Unique Unsubscribes
          example: true
          schema:
            type: boolean
        - name: email
          in: query
          description: Selects the email campaigns unsubscribed from by a specific email contact, using the email address as the reference
          example: "johndoe@example.com"
          schema:
            type: string
            format: email          
        - name: uid
          in: query
          description: Selects the email campaigns unsubscribed from by a specific email contact, using the value of the unique identifier field as the reference
          example: "AB13EZ"
          schema:
            type: string 
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/unsubscribes_schema"

    "/accounts/:account_id/reports/complaints.json":
      get:
        summary: Get Email Complaints
        description: Returns a list of all Contacts that have issued a spam complaint from an email campaign they received
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: fields
          in: query
          description: The custom fields passed in the query string will be returned in the response payload.
          example: "membership_level,membership_renewal_date, first_name, last_name, phone"
          schema:
            type: string
        - name: from
          in: query
          description: Start of the date range for spam complaints in yyyy-mm-dd format
          example: "2023-01-05"
          schema:
            type: date-time
        - name: to
          in: query
          description: End of the date range for spam complaints in yyyy-mm-dd format
          example: "2023-01-31"
          schema:
            type: date-time
        - name: unique
          in: query
          default: false
          description:  If set to **true**, then returns only Unique Complaints
          example: true
          schema:
            type: boolean
        - name: email
          in: query
          description: Selects the spam complaints from a specific email contact, using the email address as the reference
          example: "johndoe@example.com"
          schema:
            type: string
            format: email          
        - name: uid
          in: query
          description: Selects the spam complaints from a specific email contact, using the value of the unique identifier field as the reference
          example: "AB13EZ"
          schema:
            type: string 
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                   "$ref": "#/components/schemas/complaints_schema"

    "/accounts/:account_id/reports.json":
      get:
        summary: Get Email Campaign Reports
        description: Returns a list of Email Campaign Reports
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      status:
                        type: string
                        example: sent
                      campaign_id:
                        type: integer
                        example: 79
                      name:
                        type: string
                        example: Another Test 71
                      send_at:
                        type: string
                        format: date-time
                        example: '2023-06-05T08:32:23.965-04:00'
                      sent_at:
                        type: string
                        format: date-time
                        example: '2023-06-05T08:32:23.965-04:00'
                      sent:
                        type: integer
                        example: 20
                      delivered:
                        type: integer
                        example: 2
                      open:
                        type: integer
                        example: 10
                      click:
                        type: integer
                        example: 4
                      bounce:
                        type: integer
                        example: 1
                      created_at:
                        type: string
                        format: date-time
                        example: '2023-06-05T08:32:23.965-04:00'
                      updated_at:
                        type: string
                        format: date-time
                        example: '2023-06-05T08:32:23.965-04:00'
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affilate"
                          - type: string
                            example: "offers"
                      total_pages:
                        type: integer
                        example: 2

      post:
        summary: Create Custom Report
        description: Creates a new Email Campaign Custom Report
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
              application/json:
                schema:
                  type: object
                  properties:
                    report:
                      type: object
                      properties:
                        report_type:
                          type: string
                          example: "campaign"
                        name:
                          type: string
                          example: A custom report
                        from:
                          type: string
                          format: date
                          example: '2025-02-04'
                        upto:
                          type: string
                          format: date
                          example: '2025-02-04'
                        brand_ids:
                          type: array
                        ctag_ids:
                          type: array
                        criteria:
                          type: object
                          properties:
                            ctags: 
                              type: string
                              example: "or"
                            include_future_campaigns:
                              type: boolean
                              example: true
                            select_all_campaign_ids:
                              type: boolean
                              example: true
                        campaign_ids:
                          type: array
                          description: You can add up-to 500 campaign_ids in your API call.
                        selected_fields:
                          type: array
                        select_options:
                          type: array
                          items:
                            type: string
                          example:
                            - "recurring"
                            - "trans"
                            - "sent"
                            - "wi"
                            - "test"
                            - "all"
                        email_file_type:
                          type: integer
                          example: 1
                        send_to_email:
                          type: array
                          items: 
                            type: string
                            example: "johndoe@example.com"
                        send_to_subject:
                          type: string
                          example: "test"
                        send_to_comments:
                          type: string
                          example: ""
                        email_option:
                          type: boolean
                          example: true
                        time_format:
                          type: integer
                          example: 1
                        schedule_type:
                          type: integer
                          example: 2
                        day_wise:
                          type: boolean
                          example: false
                        run_at_option:
                          type: integer
                          example: 5
                        runtime:
                          type: date-time
                          example: '2025-02-04 11:45 PM'
                    report_type:
                      type: string
                      example: campaign
                    campaign_status:
                      type: array
 
    "/accounts/:account_id/ab_reports.json":
      get:
        summary: Get AB Campaign Reports
        description: Returns a list of AB Campaign Reports
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: name
          in: query
          description: The specific name of an AB Campaign
          example: "2023-01-15 Solo Newsletter: AquaTrue"
          schema:
            type: string 
        - name: from
          in: query
          description: Start of the date range for AB Campaign sent in yyyy-mm-dd format.            
          example: 2023-01-13
          schema:
            type: date-time
        - name: to
          in: query
          description: End of the date range for AB Campaign sent in yyyy-mm-dd format.
          example: 2023-01-31
          schema:
            type: date-time
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                   "$ref": "#/components/schemas/ab_reports_schema"

    "/accounts/:account_id/reports/test_reports.json":
      get:
        summary: Get Test Campaign Reports
        description: Returns a list of Test emails 
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      total_pages:
                        type: integer
                        example: 1
                      test:
                        type: string
                        description: The name of the test campaign will always be the name of the campaign followed by the timestamp when the test campaign was sent
                        example: "aug7, NutraThrive (Cat) - Niche segment___20240806T19424301"
                      campaign_id:
                        type: integer
                        example: 10319265
                      send_at:
                        type: date-time
                        example: '2023-06-05T08:32:23.971-04:00'
                      sent_at:
                        type: date-time
                        example: '2023-06-05T08:32:23.971-04:00'
                      sent:
                        type: integer
                        example: 5
                      delivered:
                        type: integer
                        example: 5
                      opens:
                        type: integer
                        example: 3
                      clicks:
                        type: integer
                        example: 3
                      bounces:
                        type: integer
                        example: 0
                      created_at:
                        type: date-time
                        example: '2023-06-05T08:32:23.971-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-05T08:32:23.971-04:00'

    "/accounts/:account_id/reports/journeys.json":
      get:
        summary: Get Journey Reports 
        description: Returns a list of Journey Campaign Reports 
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      total_pages:
                        type: integer
                        example: 15
                      journey:
                        type: string
                        example: "Welcome Series - Newsletter opt-in"
                      campaigns:
                        type: array
                        items:
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 18
                              name:
                                type: string
                                example: "Welcome Email 1"
                              sent:
                                type: integer
                                example: 4609
                              delivered:
                                type: integer
                                example: 4487
                              open:
                                type: integer
                                example: 391
                              click:
                                type: integer
                                example: 250
                              bounce:
                                type: integer
                                example: 12
                          - type: object
                            properties:
                              campaign:
                                type: string
                                example: "Welcome Email 2"
                              sent:
                                type: integer
                                example: 4123
                              delivered:
                                type: integer
                                example: 4118
                              open:
                                type: integer
                                example: 251
                              click:
                                type: integer
                                example: 177
                              bounce:
                                type: integer
                                example: 3
                      sent:
                        type: integer
                        example: 8732
                      delivered:
                        type: integer
                        example: 8605
                      open:
                        type: integer
                        example: 642
                      click:
                        type: integer
                        example: 427
                      bounce:
                        type: integer
                        example: 15
                      created_at:
                        type: date-time
                        example: '2023-06-05T08:32:23.974-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-05T08:32:23.974-04:00'


    "/accounts/:account_id/reports/custom_reports/list.json":
      get:
        summary: Get Custom Email List Report
        description: Returns a list of List reports
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                   "$ref": "#/components/schemas/custom_reports_schema"

    "/accounts/:account_id/reports/custom_reports/campaign.json":
      get:
        summary: Get Campaign Custom Reports
        description: Returns a list of Email Campaign custom reports
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                   "$ref": "#/components/schemas/custom_reports_schema"

    "/accounts/:account_id/reports/:id.json":
      get:
        summary: Get Campaign Custom Report
        description: Returns delivery and response metrics of an Email Campaign custom report
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: id of the report
          example: 41970
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                   "$ref": "#/components/schemas/custom_reports_schema"
                      
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"
      delete:
        summary: Delete Report
        description: Deletes a report
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: id of the report
          example: 41970
          schema:
            type: integer



    "/accounts/:account_id/ytd_reports.json":
      get:
        summary: Get Year-to-Date Reports
        description: Returns a list of Year-to-Date reports 
        tags:
        - Reports
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                   "$ref": "#/components/schemas/custom_reports_schema"



#Product/Revenue

    "/accounts/:account_id/orders/find.json":
      get:
        summary: Get Order (by MMC Order ID)
        description: Returns the details of an Order using the Order ID assigned by Marketing Cloud when created within your account
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: where[id]
          in: query
          description: ID of the Order assigned by Marketing Cloud
          example: 33
          schema:
            type: integer
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/order_schema"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Order ID not found"
      put:
        summary: Update Order (by MMC Order ID)
        description: Updates an Order using the Order ID assigned by Marketing Cloud when created within your account
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: where[id]
          in: query
          description: ID of the Order assigned by Marketing Cloud
          example: 33
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/order_update"

      delete:
        summary: Delete Order (by MMC Order ID)
        description: Delete an existing Order referencing it by the Order ID assigned by Marketing Cloud
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: where[id]
          in: query
          description: ID of the Order assigned by Marketing Cloud
          example: 33
          schema:
            type: integer
        - name: product_ids
          in: path
          description: |
           _(optional)_ Use this attribute to update an Order and remove specific products from an Order.
           If not provided, then the entire Order will be deleted.


    "/accounts/:account_id/orders/:original_order_id.json":
      get:
        summary: Get Order (by Commerce site's Original Order ID)
        description: Returns the details of an Order using the Order ID assigned by your eCommerce site when first created
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: original_order_id
          in: path
          description: Order ID from your eCommerce platform
          example: N142
          schema:
            type: string
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/order_schema"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
                      example: "Order ID not found"
      put:
        summary: Update Order (by Original Order ID)
        description: Update an existing Order referencing it by the Order ID originally assigned by your eCommerce platform
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: original_order_id
          in: path
          description: Order ID assigned by your eCommerce platform
          example: "N142"
          schema:
            type: string

        requestBody:
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/order_update"

      delete:
        summary: Delete Order (by Original Order ID)
        description: Delete an existing Order referencing it by the Order ID originally assigned by your eCommerce platform
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: original_order_id
          in: path
          description: Order ID assigned by your eCommerce platform
          example: "N142"
          schema:
            type: string
        - name: product_ids
          in: path
          description: |
           _(optional)_ Use this attribute to update an Order and remove specific products from an Order.
           If not provided, then the entire Order will be deleted.


    "/accounts/:account_id/orders.json":
      post:
        summary: Create Order
        description: Creates a new order
        tags:
        - Orders
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: unique
          in: query
          description: Set this optional attribute to TRUE when you want to to prevent multiple orders being created for the same contact having the same original Order ID.  
          example: true
          schema:
            type: string
        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      contact:
                        type: object
                        properties:
                          email:
                            type: string
                            format: email
                            example: tester@example.com
                            description: |
                             - **Note**: For regular accounts, you must provide it with the payload.
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          uid:
                            description: |
                              An ID that uniquely identifies each contact.
                              - **Note**: For regular accounts, UID is generated automatically and therefore isn’t required. However, for customer-provided UID accounts, you must provide it with the payload.
                            type: string
                            example: AB13EZ
                      custom_field:
                        description: Assign values to any existing custom field for this customer
                        type: object
                        properties:
                          <name-of-custom-field1>:
                            example: true
                          <name-of-custom-field2>:
                            example: 2022-11-29
                      add_tags:
                          description: Use this attribute to assign a Contact tag to this customer. Please note that the Contact tag must already exist in Marketing Cloud before you can use it.
                          type: array
                          items:
                            type: string
                            example: Bundle Package Buyer
                      remove_tags:
                          description: Use this atrribute to remove a Contact tag from this customer.
                          type: array
                          items:
                            type: string
                            example: Bundle Package Shopper
                      list_ids:
                        type: string
                        description: a comma-separated sting of List IDs from your Marketing Cloud account
                        example: 12,13
                      order_date:
                        type: date-time
                      order_status:
                        description: The status of this order, as assigned from your eCommerce platform.
                        type: string
                        example: Processed
                      original_order_id:
                        description: This required attribute is the Order ID that is assigned by your eCommerce platform at the time the order is created.
                        type: string
                        example: "N142"
                      grand_total:
                        type: float
                        example: "137.03"
                      campaign_id:
                        type: integer
                        example: 98223
                      coupon_code:
                        description: Use this attribute only if you are using the Coupon Bank feature. If you provide a coupon code that has not been issued from a Coupon Bank within the account, then it will be ignored and not stored with the Order.
                        type: string
                        example: DISCOUNT-50
                      source_name:
                        description: |
                         This optional attribute can be either the name or the URL of your web store. It appears within Marketing Cloud in Journey triggers.
                         
                         If not provided, the default value is "api".
                        type: string
                        example: myStore.neto.com.au
                      source_type:
                        description: |
                            This optional attribute is a keyword used by the Segment Builder and the Product Content Feed editor.  Use it for selecting Product Brands, and Product Categories.                       
                            
                            If not provided, the default value is "api".

                            Acceptable values include the following keywords: 1shoppingcart, clickbank, digistore24, keap, magento, nanacart, nanacast, neto, retail express, shift4shop, shopify, ultracart, and zapier.

                            If you want to provide a different **source_type**, please contact your Customer Success Manager.
                        type: string
                        example: neto
                      order_items:
                        type: array
                        items:
                          - type: object
                            properties:
                              item_id:
                                type: string
                                description:  The product SKU
                                example: BLESH012
                              price:
                                type: float
                                example: 12.35
                              quantity:
                                type: string
                                description: _(optional)_ If not provided, then will default to '1'
                                example: "3"
                              name:
                                type: string
                                example: "Blue Eyeliner"
                              description:
                                type: string
                                example: "Blue Eyeliner with Aloe"
                              image_url:
                                type: string
                                description: The full URL to the product's image from your web store
                                format: url
                                example: "https://myStore.neto.com.au/product/product1_image.jpeg"
                              store_url:
                                type: string
                                description: "The full URL to the product's landing page on your web store"
                                format: url
                                example: https://myStore.neto.com.au/product/product1_page.html
                              adcode:
                                type: string
                                description: _Not used any more_
                                default: null
                              category:
                                type: string
                                example: Cosmetics
                              status:
                                type: boolean
                                description: Is this product currently available for sale in the web store?
                                example: true
                              availability:
                                type: integer
                                description: The quantity of product currently available for sale in the web store
                                example: 100
                              brand:
                                type: string
                                example: Max Factor
                              published:
                                type: boolean
                                description: Is this product currently visible in the web store?
                                example: true
                            required:
                              - item_id
                          - type: object
                            properties:
                              item_id:
                                type: string
                                description: The product SKU
                                example: NAT53985
                              price:
                                type: float
                                example: 49.99
                              quantity:
                                type: string
                                description: _(optional)_ If not provided, then will default to '1'
                                example: "2"
                              name:
                                type: string
                                example: "Naturale Bodywash"
                              description:
                                type: string
                                example: "Naturale Brightening Pomegranate Bodywash 32oz"
                              image_url:
                                type: string
                                description: The full URL to the product's image from your web store
                                format: url
                                example: "https://myStore.neto.com.au/product/product1_image.jpeg"
                              store_url:
                                type: string
                                description: "The full URL to the product's landing page on your web store"
                                format: url
                                example: https://myStore.neto.com.au/product/product1_page.html
                              adcode:
                                type: string
                                description: _Not used any more_
                                default: null
                              category:
                                type: string
                                example: Cosmetics
                              status:
                                type: boolean
                                description: Is this product currently available for sale in the web store?
                                example: true
                              availability:
                                type: integer
                                description: The quantity of product currently available for sale in the web store
                                example: 100
                              brand:
                                type: string
                                example: Max Factor
                              published:
                                type: boolean
                                description: Is this product currently visible in the web store?
                                example: true
                            required:
                              - item_id                              
                    required:
                    - order_date
                    - order_status
                    - original_order_id
                    - order_items

    "/accounts/:account_id/products.json":
      get:
        summary: Get Products
        description: Returns a list of Products
        tags:
        - Products
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Succesful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 33
                      account_id:
                        type: integer
                        example: 11370
                      cart_id:
                        type: string
                        example: "1"
                      item_id:
                        type: string
                        example: BLESH012
                      name:
                        type: string
                        example: Blue Eyeliner
                      description:
                        type: string
                        example: "Blue Eyeliner with Aloe"
                      crm_id:
                        type: integer
                        example: 47
                      adcode:
                        type: string
                        example: null
                      category:
                        type: string
                        example: Cosmetics
                      created_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.450-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.450-04:00'
                      price:
                        type: float
                        example: 12.35
                      image_url:
                        type: string
                        example: "https://myShop.neto.com.au/products/product_image.jpeg"
                        format: url
                      store_url:
                        type: string
                        example: "https://myShop.neto.com.au/products/product_landing_page.html"
                        format: url
                      status:
                        type: boolean
                        example: true
                      availability:
                        type: integer
                        example: 5000
                      brand:
                        type: string
                        example: "Max Factor"
                      published:
                        type: boolean
                        example: true
                      categories:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 8
                            name:
                              type: string
                              example: "Cosmetics"
                            parent_ids:
                              type: string
                              example: "156"
                            source_type:
                              type: string
                              example: neto
                            source_name:
                              type: string
                              example: myShop.neto.com.au

      post:
        summary: Create Product
        description: Creates a new Product
        tags:
        - Products
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      cart_id:
                        type: string
                        example: "1"
                      crm_id:
                        type: integer
                        example: 47
                      name:
                        type: string
                        example: "Blue Eyeliner"
                      description:
                        type: string
                        example: "Blue Eyeliner with Aloe"
                      item_id:
                        type: string
                        description: The Product SKU
                        example: "BLESH012"
                      adcode:
                        type: string
                        example: null
                      category:
                        type: string
                        example: Cosmetics
                      price:
                        type: integer
                        example: 12.35
                      image_url:
                        type: string
                        example: "https://myShop.neto.com.au/products/product_image.jpeg"
                        format: url
                      store_url:
                        type: string
                        example: "https://myShop.neto.com.au/products/product_landing_page.html"
                        format: url
                      status:
                        type: boolean
                        example: true
                      availability:
                        type: integer
                        example: 5000
                      brand:
                        type: string
                        example: "Max Factor"
                      published:
                        type: boolean
                        example: true
                      created_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.452-04:00'
                    required:
                    - item_id

    "/accounts/:account_id/products/:item_id.json":
      get:
        summary: Get Product
        description: Returns the details of a specific Product SKU
        tags:
        - Products
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: item_id
          in: path
          description: The Product's SKU
          example: "BLESH012"
          schema:
            type: string
        responses:
          '200':
            description: Succesful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    product:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 33
                        account_id:
                          type: integer
                          example: 11370
                        cart_id:
                          type: string
                          example: "1"
                        item_id:
                          type: string
                          description: The Product SKU
                          example: "BLESH012"
                        name:
                          type: string
                          example: Blue Eyeliner
                        description:
                          type: string
                          example: "Blue Eyeliner with Aloe"
                        crm_id:
                          type: integer
                          example: 47
                        adcode:
                          type: string
                          example: null
                        category:
                          type: string
                          example: Cosmetics
                        created_at:
                          type: date-time
                          example: '2023-06-01T13:07:25.450-04:00'
                        updated_at:
                          type: date-time
                          example: '2023-06-01T13:07:25.450-04:00'
                        price:
                          type: float
                          example: 12.35
                        image_url:
                          type: string
                          format: url                          
                          example: "https://myShop.neto.com.au/products/product_image.jpeg"
                        store_url:
                          type: string
                          format: url
                          example: "https://myShop.neto.com.au/products/product_landing_page.html"
                        status:
                          type: boolean
                          example: true
                        availability:
                          type: integer
                          example: 5000
                        brand:
                          type: string
                          example: "Max Factor"
                        published:
                          type: boolean
                          example: true
                        categories:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 8
                              name:
                                type: string
                                example: "Cosmetics"
                              parent_ids:
                                type: string
                                example: "156"
                              source_type:
                                type: string
                                example: neto
                              source_name:
                                type: string
                                example: myShop.neto.com.au
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    errors:
                      type: string
                      example: "not found"

    "/accounts/:account_id/products/:product_id.json":
      put:
        summary: Update Product
        description: Update a Product using the ID of the Product assigned by Marketing Cloud
        tags:
        - Products
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: product_id
          in: path
          description: ID of product
          example: 33
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      cart_id:
                        type: string
                        example: "1"
                      crm_id:
                        type: integer
                        example: 47
                      name:
                        type: string
                        example: "Blue Eyeliner"
                      description:
                        type: string
                        example: "Blue Eyeliner with Aloe"
                      item_id:
                        type: string
                        example: "BLESH012"
                      adcode:
                        type: string
                        example: null
                      category:
                        type: string
                        example: Cosmetics
                      price:
                        type: integer
                        example: 12.35
                      image_url:
                        type: string
                        example: "https://myShop.neto.com.au/products/product_image.jpeg"
                        format: url
                      store_url:
                        type: string
                        example: "https://myShop.neto.com.au/products/product_landing_page.html"
                        format: url
                      status:
                        type: boolean
                        example: true
                      availability:
                        type: integer
                        example: 5000
                      brand:
                        type: string
                        example: "Max Factor"
                      published:
                        type: boolean
                        example: true
                      updated_at:
                        type: date-time
                        example: '2023-06-01T13:07:25.452-04:00'

      delete:
        summary: Delete Product
        description: Delete a product by its ID assigned by Marketing Cloud
        tags:
        - Products
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: product_id
          in: path
          description: ID of the Product 
          schema:
            type: integer

#Abandoned Cart
    "/v2/:account_id/register_shop.json":
      post:
        summary: Create Shop
        description: Registers your web store with Marketing Cloud's Abandoned Cart event listener, with a trigger delay set to 30 minutes by default.
        tags:
        - Abandoned Cart
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  shop:
                    type: object
                    properties:
                      shop_name:
                        type: string
                        description: The name of your web store as it will appear in Marketing Cloud
                        example: "My Web Store"
                      shop_type:
                        type: string
                        description: A keyword you provide that defines your eCommerce platform. Its value appears in the Segment Builder when creating segment rules based on Purchase Activity. The value that you provide here in will be used to determine what product Brand and/or product Category you wish to specify for your segment.
                        example: "woocommerce"
                      shop_url:
                        type: string
                        description: |
                          The base domain of your web store. You do not need to provide the protocol (e.g. omit “https://”). This web store URL will appear in the abandoned cart trigger in the Journey Builder and is used to specify which web store’s abandoned cart event will trigger a particular Journey.

                          > **NOTE**: Once you set the shop_url, you cannot change its value.
                        example: "myShop.neto.com.au"
                    required:
                      - shop_name
                      - shop_type
                      - shop_url
                  create_journey:
                    type: boolean
                    default: false
                    description: If you set this attribute to **true** then a successful POST will automatically create an Abandoned Cart Journey. The method response payload will include the Journey ID and auto-generated Journey name. To learn more about creating such journeys, read [Abandoned Cart Journey Templates](https://galaxy.maropost.com/s/article/Abandoned-Cart-Journey-Template).
        responses:
          '201':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        shop_id:
                          type: integer
                          example: 101
                        shop_name:
                          type: string                          
                          example: "My Web Store"
                        shop_url:
                          type: string
                          example: "myShop.neto.com.au"
                        shop_type:
                          type: string
                          example: "neto"
                        abandoned_cart_delay:
                          type: object
                          description: By default, the delay is set to 30 minutes. Log in to your Marketing Cloud account to change the delay if necessary.
                          properties:
                            hours:
                              type: integer
                              example: 0
                            minutes:
                              type: integer
                              example: 30
                        is_active:
                          type: boolean
                          default: true
                        created_at:
                          type: date-time
                          example: "2023-06-01T13:07:25.452-04:00"
                        updated_at:
                          type: date-time
                          example: "2023-06-01T13:07:25.452-04:00"
                    message:
                      type: string
                      example: "Shop registered successfully."

    "/v2/:account_id/abandoned_carts/:shop_id.json":
      post:
        summary: Create Abandoned Cart Event
        description: |
          Once you've registered your store with your Marketing Cloud account's Abandoned Cart event listener, use this method to trigger an abandoned cart event.

          > **NOTE**: You must have an _active_ Journey with an Abandoned Cart trigger for your web store before any notifications will be sent to the cart abandoner.
          - The `uid` attribute is required in the POST payload for Custom UID accounts only.

          If you're unsure whether your account is a Custom UID account, please check with your account administrator.
        tags:
        - Abandoned Cart
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: shop_id          
          in: path
          description: Your web store's shop_id that was returned in the response payload when you successfully registered your store.  You can also find the shop_id by logging in to your Marketing Cloud Account.  Select **Integrations** from the main menu.  Then click the **Abandoned Cart REST API** tile.
          example: 101
          schema:
            type: integer
        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart_data:
                    type: object
                    properties:
                      contact:
                        type: object
                        properties:
                          uid:
                            type: string
                            description: |
                              The contact's Unique Identifier as provided by your CRM. 
                              - **Note**: This attribute is required **only** for Custom UID accounts.
                            example: "AB1234"
                          email:
                            type: string
                            format: email
                            description: The email address of the cart abandoner. This method acts as an UPSERT action.  If a contact with this email address already exists, then the abandoned event will be associated with it for this Shop ID.  If the email address does not already exist, then a new Contact record will be created.
                            example: "johndoe@example.com"
                      original_cart_id:
                        type: integer
                        description: The ID that your system assigned to the abandoned cart event.
                        example: 104
                      status:
                        type: string
                        description: |
                          The allowed keywords are:
                          * **abandoned** -- Indicates an abandoned cart event.
                          * **closed** -- Indicates the abandoned cart has been recovered.

                          > **NOTE**: A contact's cart remains abandoned until you indicate that it has been recovered. This implies that repetitive calls for the same contact and original_cart_id will not retrigger an Abandoned Cart Journey for that contact. Only when the original_cart_id is recovered (status: 'closed') will the contact enter the Journey again.
                        example: abandoned
                      last_activity_at:
                        type: date-time
                        description: |
                          This timestamp corresponds to when you detected the abandoned cart event in your web store.

                          The abandoned cart delay in Marketing Cloud is based on this timestamp that you provide.

                          The default time zone is in Eastern time zone. You can append a different timezone code if the timezone of your web store is different. For example, "2024-03-21T07:46:48Z" will register the abandoned cart event in GMT timezone format.
                        example: "2023-06-01T13:07:25"
                      restore_url:
                        type: string
                        format: url
                        description: The recovery URL on your web store that takes the user back to the cart that was abandoned.
                        example: "myShop.neto.com.au/1cWAfSVRX5s4SOeV"
                      order_items:
                        type: array
                        items:
                          - type: object
                            properties:
                              name:
                                type: string
                                example: "Blue Eyeliner"
                              sku:
                                type: string
                                example: BLESH012
                              quantity:
                                type: string
                                description: _(optional)_ If not provided, then will default to "1"
                                example: "3"                                  
                              product_price:
                                type: float
                                example: 12.35
                              unit_price:
                                type: float
                                description: The (product_price) * (quantity)
                                example: 37.05
                              image_url:
                                type: string
                                description: The full URL to the product's image from your web store.
                                format: url 
                                example: "https://myStore.neto.com.au/product/product1_image.jpeg"
                              store_url:
                                type: string
                                description: The full URL to the product's landing page on your web store
                                format: url
                                example: "https://myStore.neto.com.au/product/product1_page.html"
                            required:
                              - sku
                          - type: object
                            properties:
                              name:
                                type: string
                                example: "Naturale Bodywash"
                              sku:
                                type: string
                                example: "NAT53985"
                              quantity:
                                type: string
                                description: _(optional)_ If not provided, then will default to '1'
                                example: "2"
                              product_price:
                                type: float
                                example: 49.99
                              unit_price:
                                type: float
                                description: The (product_price) * (quantity)
                                example: 99.98
                              image_url:
                                type: string
                                description: The full URL to the product's image from your web store
                                format: url
                                example: "https://myStore.neto.com.au/product/product1_image.jpeg"
                              store_url:
                                type: string
                                description: "The full URL to the product's landing page on your web store"
                                format: url
                                example: https://myStore.neto.com.au/product/product1_page.html
                            required:
                              - sku                            
                    required:
                      - contact
                      - original_cart_id                      
        responses:
          "200":
            description: Successful Operation
          "422":
            description: Unprocessable Entity

    "/v2/:account_id/update_shop/:shop_id.json":
      patch:
        summary: Update Shop
        description: Modifies the shop name and toggles its active/inactive status
        tags:
        - Abandoned Cart
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: shop_id          
          in: path
          description: Your web store's shop_id that was returned in the response payload when you successfully registered your store.  You can also find the shop_id by logging in to your Marketing Cloud Account.  Select **Integrations** from the main menu.  Then click the **Abandoned Cart REST API** tile.
          example: 101
          schema:
            type: integer
        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  shop:
                    type: object
                    properties:
                      shop_name:
                        type: string
                        description: Alphanumeric characters only
                        example: "myNewNeto Shop"
                      is_active:
                        type: boolean
                        example: false                        
        responses:
          "200":
            description: "Successful Operation"
          "422":
            description: "Unprocessable Entity"
  
#Email Campaigns
    "/accounts/:account_id/campaigns.json":
      get:
        summary: Get Campaigns
        description: Returns a list of all email campaigns
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 100880
                      name:
                        type: string
                        example: "2023-01-10 Solo Newsletter: AquaTrue"
                      account_id:
                        type: integer
                        example: 11370
                      content_id:
                        type: integer
                        example: 43060
                      content_history_id:
                        type: integer
                        example: 30822
                      from_email:
                        type: string
                        format: email
                        example: "health@magellan.com"
                      subject:
                        type: string
                        example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
                      reply_to:
                        type: string
                        format: email
                        example: "health@magellan.com"
                      from_name:
                        type: string
                        example: "Magellan Health"
                      preheader:
                        type: string
                        example: "Healthy Hydration = Better Health"
                      send_at:
                        type: date-time
                        example: "2023-01-10T08:30:00.000-04:00"
                      sent_at:
                        type: date-time
                        example: "2023-01-10T08:30:00.000-04:00"
                      status:
                        type: string
                        example: "sent"
                      test_campaign:
                        type: boolean
                        default: false
                      language:
                        type: string
                        example: 'en'
                      address:
                        type: string
                        example:  "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                      contacts_count:
                        type: integer
                        example: 17286
                      recurring:
                        type: object
                        default: null
                        description: Included only if "status=recurring", indicating an Email Campaign automatically sent on a recurring schedule 
                        properties: 
                          schedule:
                            type: string
                            example: "day_of_week"
                          days:
                            type: array
                            description: Where 0 = Sunday
                            items:
                              - type: string
                                example: "2"
                              - type: string
                                example: "4"
                      recurring_time:
                        type: date-time
                        default: null
                        description: Included only if "status=recurring". Indicates the date and time when the next campaign will be sent according to the recurring schedule.
                      parent_id:
                        type: integer
                        description: |
                          Depending upon the type of campaign, this attribute has a different meaning.

                          * If the campaign was a test campaign, then parent_id is the ID of the original campaign that the test campaign was sent from.
                          * If the campaign was a recurring campaign, then parent_id is the ID of the parent campaign that displays the grand total counts of the delivery and response metrics of each individual day's sends. 
                        default: null
                      version_number:
                        type: integer
                        default: null
                      campaign_type:
                        type: integer
                        description: |
                          * **1** -- Bulk-send Campaign, or Transactional Campaign
                          * **3** -- AB Campaign
                          * **4** -- Journey Campaign
                        example: 1
                      decided_by:
                        type: string
                        description: |
                          Included only for AB Campaigns. Indicates the winning criteria specified for the AB Test.

                          Values include the following:
                          * **TopChoice** - The campaign sent to the final audience combines the subject line and from name from the test group having the highest open rate together with the content from the test group having the highest click rate.
                          * **Opens** - The campaign sent to the final audience is from the text group having the highest open rate.
                          * **Clicks** - The campaign sent to the final audience is from the text group having the highest click rate.
                          * **click-to-open** - The campaign sent to the final audience is from the text group having the highest click-to-open rate.
                          * **conversions** - The campaign sent to the final audience is from the text group having the highest conversion rate (requires that you account be enabled for Product/Revenue).
                        default: null
                      winner_campaign_id:
                        type: integer
                        description: Included only for AB Campaigns. Indicates the winning test group's Campaign ID according to the specified **decided_by** criteria.
                        default: null
                      campaign_group_id:
                        type: integer
                        default: null
                      suppress_workflow:
                        type: boolean
                        default: false
                      email_preview_link:
                        type: boolean
                        example: true
                      send_optimization:
                        type: boolean
                        description: Indicates whether this campaign was sent using the "Send-time Optimization" option
                        default: false
                      workflow_item_id:
                        type: integer
                        description: Included only for Journey Campaigns. Indicates ID of the "Send Email" Action element that sent this Email Campaign.
                        default: null
                      one_time:
                        type: boolean
                        description: Indicates whether this campaign was sent using the "Time Zone Optimization" option
                        default: false
                      folder_id:
                        type: integer
                        example: 2
                      crm_name:
                        type: string
                        default: null
                      brand_id:
                        type: integer
                        example: 32
                      crm_campaign_id:
                        type: integer
                        default: null
                      created_at:
                        type: date-time
                        example: "2023-01-08T07:06:47.000-04:00"
                      updated_at:
                        type: date-time
                        example: "2023-01-10T08:30:00.000-04:00"
                      total_pages:
                        type: integer
                        example: 52
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affilate"
                          - type: string
                            example: "offers"

    "/accounts/:account_id/campaigns/:id.json":
      get:
        summary: Get Campaign
        description: Returns the campaign details of the specified email campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the Email Campaign
          example: 100880
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 100880
                    name:
                      type: string
                      example: "2023-01-10 Solo Newsletter: AquaTrue"
                    account_id:
                      type: integer
                      example: 11370
                    content_id:
                      type: integer
                      example: 43060
                    content_history_id:
                      type: integer
                      example: 30822
                    from_email:
                      type: string
                      format: email
                      example: "health@magellan.com"
                    subject:
                      type: string
                      example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
                    reply_to:
                      type: string
                      format: email
                      example: "health@magellan.com"
                    from_name:
                      type: string
                      example: "Magellan Health"
                    preheader:
                      type: string
                      example: "Healthy Hydration = Better Health"
                    send_at:
                      type: date-time
                      example: "2023-01-10T08:30:00.000-04:00"
                    sent_at:
                      type: date-time
                      example: "2023-01-10T08:30:00.000-04:00"
                    status:
                      type: string
                      example: "sent"
                    test_campaign:
                      type: boolean
                      default: false
                    language:
                      type: string
                      example: 'en'
                    address:
                      type: string
                      example:  "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                    contacts_count:
                      type: integer
                      example: 17286
                    recurring:
                      type: object
                      default: null
                      description: Included only if "status=recurring", indicating an Email Campaign automatically sent on a recurring schedule 
                      properties: 
                        schedule:
                          type: string
                          example: "day_of_week"
                        days:
                          type: array
                          description: Where 0 = Sunday
                          items:
                            - type: string
                              example: "2"
                            - type: string
                              example: "4"
                    recurring_time:
                      type: date-time
                      default: null
                      description: Included only if "status=recurring". Indicates the date and time when the next campaign will be sent according to the recurring schedule.
                    parent_id:
                      type: integer
                      description:  |
                        Depending upon the type of campaign, this attribute has a different meaning.

                        * If the campaign was a test campaign, then parent_id is the ID of the original campaign that the test campaign was sent from.
                        * If the campaign was a recurring campaign, then parent_id is the ID of the parent campaign that displays the grand total counts of the delivery and response metrics of each individual day's sends. 
                      default: null
                    version_number:
                      type: integer
                      default: null
                    campaign_type:
                      type: integer
                      description: |
                        * **1** -- Bulk-send Campaign, or Transactional Campaign
                        * **3** -- AB Campaign
                        * **4** -- Journey Campaign
                      example: 1
                    decided_by:
                      type: string
                      description: |
                        Included only for AB Campaigns. Indicates the winning criteria specified for the AB Test.

                        Values include the following:
                        * **TopChoice** - The campaign sent to the final audience combines the subject line and from name from the test group having the highest open rate together with the content from the test group having the highest click rate.
                        * **Opens** - The campaign sent to the final audience is from the text group having the highest open rate.
                        * **Clicks** - The campaign sent to the final audience is from the text group having the highest click rate.
                        * **click-to-open** - The campaign sent to the final audience is from the text group having the highest click-to-open rate.
                        * **conversions** - The campaign sent to the final audience is from the text group having the highest conversion rate (requires that you account be enabled for Product/Revenue).
                      default: null
                    winner_campaign_id:
                      type: integer
                      description: Included only for AB Campaigns. Indicates the winning test group's Campaign ID according to the specified **decided_by** criteria.
                      default: null
                    campaign_group_id:
                      type: integer
                      default: null
                    suppress_workflow:
                      type: boolean
                      default: false
                    email_preview_link:
                      type: boolean
                      example: true
                    send_optimization:
                      type: boolean
                      description: Indicates whether this campaign was sent using the "Send-Time Optimization" feature
                      default: false
                    workflow_item_id:
                      type: integer
                      description: Included only for Journey Campaigns. Indicates ID of the "Send Email" Action element that sent this Email Campaign.
                      default: null
                    one_time:
                      type: boolean
                      description: Indicates whether this campaign was sent using the "Time Zone Optimization" option
                      default: false
                    folder_id:
                      type: integer
                      example: 2
                    crm_name:
                      type: string
                      default: null
                    brand_id:
                      type: integer
                      example: 32
                    crm_campaign_id:
                      type: integer
                      default: null
                    created_at:
                      type: date-time
                      example: "2023-01-08T07:06:47.000-04:00"
                    updated_at:
                      type: date-time
                      example: "2023-01-10T08:30:00.000-04:00"
                    total_pages:
                      type: integer
                      example: 52
                    campaign_tags:
                      type: array
                      items:
                        - type: string
                          example: "affilate"
                        - type: string
                          example: "offers"

      delete:
        summary: Delete Campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the Email Campaign
          example: 100880
          schema:
            type: integer

    "/v2/:account_id/campaigns.json":
      get:
        summary: Get Campaigns (V2)
        description: Use this method instead of **GET /campaigns.json** if you want the option to obtain campaign data for each AB Campaign test group and each individual day's send of a Recurring Campaign. To get this method to return this information in the response payload include the query string parameter **include_ab_child=yes**.
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: name
          in: query
          description: _(optional)_ Include this query string parameter if you just want to retrieve the delivery and response data for a specific campaign
          example: "2023-01-10 Solo Newsletter: AquaTrue"
          schema:
            type: string
        - name: include_ab_child
          in: query
          description: _(optional)_ Include this query string parameter if you want the response to include the email campaigns of each AB Campaign's test groups, and each day's sends of Recurring Campaigns
          example: "yes"
          schema:
            type: string
        - name: per_page
          in: query
          description: _(optional)_ By default, this method returns 10 campaigns per virtual "page". Include this query string parameter if you want the method to return more campaigns per virtual "page".
          example: 20
          schema:
            type: integer
        - name: page
          in: query
          description: _(optional)_ Include this query string parameter to iterate through each virtual "page".
          example: 2
          schema:
            type: integer

        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    campaigns:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 100880
                          name:
                            type: string
                            example: "2023-01-10 Solo Newsletter: AquaTrue"
                          account_id:
                            type: integer
                            example: 11370
                          content_id:
                            type: integer
                            example: 43060
                          content_history_id:
                            type: integer
                            example: 30822
                          from_email:
                            type: string
                            format: email
                            example: "health@magellan.com"
                          subject:
                            type: string
                            example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
                          reply_to:
                            type: string
                            format: email
                            example: "health@magellan.com"
                          from_name:
                            type: string
                            example: "Magellan Health"
                          preheader:
                            type: string
                            example: "Healthy Hydration = Better Health"
                          send_at:
                            type: date-time
                            example: "2023-01-10T08:30:00.000-04:00"
                          sent_at:
                            type: date-time
                            example: "2023-01-10T08:30:00.000-04:00"
                          status:
                            type: string
                            example: "sent"
                          test_campaign:
                            type: boolean
                            default: false
                          language:
                            type: string
                            example: 'en'
                          address:
                            type: string
                            example:  "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                          contacts_count:
                            type: integer
                            example: 17286
                          recurring:
                            type: object
                            default: null
                            description: Included only if "status=recurring", indicating an Email Campaign automatically sent on a recurring schedule 
                            properties: 
                              schedule:
                                type: string
                                example: "day_of_week"
                              days:
                                type: array
                                description: Where 0 = Sunday
                                items:
                                  - type: string
                                    example: "2"
                                  - type: string
                                    example: "4"
                          recurring_time:
                            type: date-time
                            default: null
                            description: Included only if "status=recurring". Indicates the date and time when the next campaign will be sent according to the recurring schedule.
                          parent_id:
                            type: integer
                            description:  |
                              Depending upon the type of campaign, this attribute has a different meaning.

                              * If the campaign was a test campaign, then parent_id is the ID of the original campaign that the test campaign was sent from.
                              * If the campaign was a recurring campaign, then parent_id is the ID of the parent campaign that displays the grand total counts of the delivery and response metrics of each individual day's sends. 
                            default: null
                          version_number:
                            type: integer
                            default: null
                          campaign_type:
                            type: integer
                            description: |
                              * **1** -- Bulk-send Campaign, or Transactional Campaign
                              * **3** -- AB Campaign
                              * **4** -- Journey Campaign
                            example: 1
                          decided_by:
                            type: string
                            description: |
                              Included only for AB Campaigns. Indicates the winning criteria specified for the AB Test.

                              Values include the following:
                              * **TopChoice** - The campaign sent to the final audience combines the subject line and from name from the test group having the highest open rate together with the content from the test group having the highest click rate.
                              * **Opens** - The campaign sent to the final audience is from the text group having the highest open rate.
                              * **Clicks** - The campaign sent to the final audience is from the text group having the highest click rate.
                              * **click-to-open** - The campaign sent to the final audience is from the text group having the highest click-to-open rate.
                              * **conversions** - The campaign sent to the final audience is from the text group having the highest conversion rate (requires that you account be enabled for Product/Revenue).
                            default: null
                          winner_campaign_id:
                            type: integer
                            description: Included only for AB Campaigns. Indicates the winning test group's Campaign ID according to the specified **decided_by** criteria.
                            default: null
                          campaign_group_id:
                            type: integer
                            default: null
                          suppress_workflow:
                            type: boolean
                            default: false
                          email_preview_link:
                            type: boolean
                            example: true
                          send_optimization:
                            type: boolean
                            description: Indicates whether this campaign was sent using the "Send Time Optimization" option
                            default: false
                          workflow_item_id:
                            type: integer
                            description: Included only for Journey Campaigns. Indicates ID of the "Send Email" Action element that sent this Email Campaign.
                            default: null
                          one_time:
                            type: boolean
                            description: Indicates whether this campaign was sent using the "Time Zone Optimization" option
                            default: false
                          folder_id:
                            type: integer
                            example: 2
                          crm_name:
                            type: string
                            default: null
                          brand_id:
                            type: integer
                            example: 32
                          crm_campaign_id:
                            type: integer
                            default: null
                          created_at:
                            type: date-time
                            example: "2023-01-08T07:06:47.000-04:00"
                          updated_at:
                            type: date-time
                            example: "2023-01-10T08:30:00.000-04:00"
                          default_send_at:
                            type: date-time
                            example: "2023-01-10T08:30:00.000-04:00"
                    meta:
                      type: object
                      properties:
                        count:
                          type: integer
                          description:  The total number of Email Campaigns in the result set
                          example: 166
                        page:
                          type: integer
                          description: The current virtual "page" of the result set.
                          example: 1
                        per_page:
                          type: integer
                          description: The number of campaigns from the result set that are included in each virtual "page"
                          example: 10

    "/accounts/:account_id/campaigns/build.json":
      post:
        summary: Create Campaign
        description: Creates and schedules an email campaign. You can choose to save the campaign as draft or schedule the campaign to be sent. To learn about the types of sending methods, see [Creating Email Campaigns](https://galaxy.maropost.com/s/article/Creating-Email-Campaigns).
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 41970
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/default_schema"
                  - $ref: "#/components/schemas/send_time_schema"
                  - $ref: "#/components/schemas/recurring_schema"

    "/accounts/:account_id/campaigns/ab_test.json":
      post:
        summary: Create AB Campaign
        description: An AB Campaign, also known as a split campaign, helps you test your hypotheses of will work best to elicit the desired response. You can choose what you want to test (content, subject, from name, send time, etc.) and then have Marketing Cloud automatically send the campaign to your audience based on the winning criteria that you define. To learn about AB Campaigns, see [Creating AB Campaigns](https://galaxy.maropost.com/s/article/Creating-AB-Campaigns).
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "2023-01-15 Solo Newsletter: AquaTrue"
                      from_email:
                        type: string
                        format: email
                        example: "health@magellan.com"
                      reply_to:
                        type: string
                        format: email
                        example: "health@magellan.com"
                      brand_id:
                        type: integer
                        example: 22
                      suppressed_list_ids:
                        type: array
                        items:
                          - type: integer
                            example: 66
                          - type: integer
                            example: 253
                      suppressed_segment_ids:
                        type: array
                        items:
                          - type: integer
                            example: 34
                          - type: integer
                            example: 353
                      suppressed_journey_ids:
                        type: array
                        items:
                          - type: integer
                            example: 21
                          - type: integer
                            example: 23
                      address:
                        type: string
                        example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                      language:
                        type: string
                        description: |
                          Accepted values include the following:
                          * **en** - English
                          * **es** - Spanish
                          * **da** - Danish
                          * **de** - German
                          * **it** - Italian
                          * **fr** - French
                          * **nl** - Dutch
                          * **no** - Norwegian
                          * **pl** - Polish
                          * **pt** - Portuguese
                          * **sv** - Swedish
                          * **zh** - Chinese (Simplified)
                        default: en
                      email_preview_link:
                        type: boolean
                        default: false
                      lists:
                        type: array
                        items:
                          - type: integer
                            example: 15
                          - type: integer
                            example: 32
                      segments:
                        type: array
                        items:
                          - type: integer
                            example: 5
                          - type: integer
                            example: 23
                      decided_by:
                        type: string
                        description: |
                            Accepted values include the following:
                            * **TopChoice** -  The campaign sent to the final audience combines the subject line and from name from the test group having the highest open rate together with the content from the test group having the highest click rate.
                            * **Opens** - The campaign sent to the final audience is from the text group having the highest open rate.
                            * **Clicks** - The campaign sent to the final audience is from the text group having the highest click rate.
                            * **click-to-open** - The campaign sent to the final audience is from the text group having the highest click-to-open rate.
                            * **conversions** - The campaign sent to the final audience is from the text group having the highest conversion rate (requires that you account be enabled for Product/Revenue).
                        example: TopChoice
                      campaign_groups_attributes:
                        type: array
                        description: |
                          Use this array to define the test groups of your AB Campaign.

                          > **NOTE**: At least 2 test groups must be defined
                        items:
                          - type: object
                            properties:
                              name:
                                type: string
                                example: "2023-01-15 Solo Newsletter: AquaTrue - Group1"
                              content_id:
                                type: integer
                                example: 180
                              subject:
                                type: string
                                example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
                              preheader:
                                type: string
                                example: "Healthy Hydration = Better Health"
                              from_name:
                                type: string
                                example: "Magellan Health"
                              percentage:
                                type: string
                                example: "10"
                              send_at:
                                type: date-time
                                example: '2023-01-10T07:00:00-04:00'
                          - type: object
                            properties:
                              name:
                                type: string
                                example: "2023-01-15 Solo Newsletter: AquaTrue - Group2"
                              content_id:
                                type: integer
                                example: 180
                              subject:
                                type: string
                                example: "Unlock Pure Wellness with THIS"
                              preheader:
                                type: string
                                example: "The Key to Better Health"
                              from_name:
                                type: string
                                example: "Magellan Health"
                              percentage:
                                type: string
                                example: "10"
                              send_at:
                                type: date-time
                                example: '2023-01-10T07:00:00-04:00'
                      send_at:
                        type: date-time
                        example: '2023-01-10T08:30:00.000-04:00'
                      ctags:
                        type: array
                        items:
                          - type: string
                            example: "offers"
                          - type: string
                            example: "affiliate"
                      commit:
                        type: string
                        description: |
                          Allowed values include:
                          * **Save as Draft** -- Create the AB Campaign and save it in draft mode
                          * **Schedule** -- Create the AB Campaign and send each test group according to their scheduled send time 
                          * **Send Test** -- Create the AB Campaign, send all test groups to the specified test audience, and then  save it in draft mode
                        example: Schedule
                      test_lists:
                        type: array
                        description: |
                          _(Conditional)_ At least one test list or one test email address must be included if sending the campaign as a test

                          > **NOTE**: The combined total of contacts in the specified Lists cannot exceed 20 contacts
                        items:
                          - type: integer
                            example: 15
                          - type: integer
                            example: 2
                      test_emails:
                        type: array
                        description: |
                          _(Conditional)_ At least one test list or one test email address must be included if sending the campaign as a test

                          > **NOTE**: The combined total of email addresses in this string array cannot exceed 10 recipients
                        items:
                          - type: string
                            example: "qa@magellan.com"
                          - type: string
                            example: "content@magellan.com"
                    required:
                    - name 
                    - from_email
                    - reply_to
                    - campaign_groups_attributes
                    - decided_by
                    - commit
                required:
                - campaign 

    "/accounts/:account_id/campaigns/:id/delivered_report.json":
      get:
        summary: Get Delivered Report
        description: Returns a list of contacts who successfully received the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the delivered report.
          example: 885
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 885
                      contact_id:
                        type: integer
                        example: 123775
                      created_at:
                        type: date-time
                        example: "2023-01-10T08:30:00.000-04:00"
                      email:
                        type: string
                        format: email
                        example: "johndoe@example.com"
                      total_pages:
                        type: integer
                        example: 1255
                      uid:
                        type: string
                        example: "AB13EZ"
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affiliate"
                          - type: string
                            example: "promotions"

    "/accounts/:account_id/campaigns/:id/open_report.json":
      get:
        summary: Get Open Report
        description: Returns a list of contacts who opened the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the open report.
          example: 885
          schema:
            type: integer
        - name: unique
          in: query
          description: _(optional)_ Include this parameter to receive the Unique Opens report.
          example: true
          schema:
            type: boolean
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/open_reports_schema"


    "/accounts/:account_id/campaigns/:id/click_report.json":
      get:
        summary: Get Click Report
        description: Returns a list of contacts who clicked a link in the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the click report.
          example: 885
          schema:
            type: integer
        - name: unique
          in: query
          example: true
          description: _(optional)_ Include this parameter to receive the Unique Clicks report.
          schema:
            type: boolean
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/click_reports_schema"

    "/accounts/:account_id/campaigns/:id/link_report.json":
      get:
        summary: Get Link Report
        description: Returns a list of all link URLs that were clicked in the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the link report.
          example: 885
          schema:
            type: integer
        - name: unique
          in: query
          example: true
          description: _(optional)_ Include this parameter to receive the Unique Link report.
          schema:
            type: boolean
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/link_reports_schema"

    "/accounts/:account_id/campaigns/:id/bounce_report.json":
      get:
        summary: Get Bounce Report
        description: |
         Returns a list of contacts whose emails were rejected by the mailbox providers when sent from the specified campaign

         > **NOTE**: This report includes both temporary rejections (soft bounces) and permanent rejections (hard bounces)
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the bounce report.
          example: 885
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 885
                      contact_id:
                        type: integer
                        example: 714625
                      email:
                        type: string
                        format: email
                        example: "johndoe@example.com"
                      error:
                        type: string
                        example: "5.4.1"
                      diagnostic:
                        type: string
                        example: "550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [YT3CAN01FT011.eop-CAN01.prod.protection.outlook.com 2023-06-05T08:32:23.957Z 08DB80F75B69EE6F]"
                      recorded_on:
                        type: date-time
                        example: "2023-06-05T08:32:23.118-04:00"
                      total_pages:
                        type: integer
                        example: 8
                      uid:
                        type: string
                        example: "AB13EZ"
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affiliate"
                          - type: string
                            example: "promotions"


    "/accounts/:account_id/campaigns/:id/soft_bounce_report.json":
      get:
        summary: Get Soft Bounce Report
        description: Returns a list of contacts whose emails were temporarily rejected by the mailbox providers when sent from the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the soft bounce report.
          example: 885
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 885
                      contact_id:
                        type: integer
                        example: 714625
                      email:
                        type: string
                        format: email
                        example: "johndoe@example.com"
                      error:
                        type: string
                        example: "4.4.2"
                      diagnostic:
                        type: string
                        example: "X-Proxmox; delivery temporarily suspended: lost connection"
                      recorded_on:
                        type: date-time
                        example: "2023-06-01T03:20:43.118-04:00"
                      total_pages:
                        type: integer
                        example: 8
                      uid:
                        type: string
                        example: "AB13EZ"
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affiliate"
                          - type: string
                            example: "promotions"


    "/accounts/:account_id/campaigns/:id/hard_bounce_report.json":
      get:
        summary: Get Hard Bounce Report
        description: Returns a list of contacts whose emails were permanently rejected by the mailbox providers when sent from the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the hard bounce report.
          example: 885
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 885
                      contact_id:
                        type: integer
                        example: 714625
                      email:
                        type: string
                        format: email
                        example: "johndoe@example.com"
                      error:
                        type: string
                        example: "5.4.1"
                      diagnostic:
                        type: string
                        example: "550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [YT3CAN01FT011.eop-CAN01.prod.protection.outlook.com 2023-06-05T08:32:23.957Z 08DB80F75B69EE6F]"
                      recorded_on:
                        type: date-time
                        example: "2023-06-01T03:20:43.118-04:00"
                      total_pages:
                        type: integer
                        example: 8
                      uid:
                        type: string
                        example: "AB13EZ"
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affiliate"
                          - type: string
                            example: "promotions"


    "/accounts/:account_id/campaigns/:id/unsubscribe_report.json":
      get:
        summary: Get Unsubscribe Report
        description: Returns a list of contacts who unsubscribed from the specified campaign
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the unsubscribe report.
          example: 885
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 885
                      contact_id:
                        type: integer
                        example: 714625
                      email:
                        type: string
                        format: email
                        example: "johndoe@example.com"
                      recorded_on:
                        type: date-time
                        example: "2023-06-01T03:20:43.118-04:00"
                      total_pages:
                        type: integer
                        example: 8
                      uid:
                        type: string
                        example: "AB13EZ"
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affiliate"
                          - type: string
                            example: "promotions"


    "/accounts/:account_id/campaigns/:id/complaint_report.json":
      get:
        summary: Get Complaint Report
        description: |
          Returns a list of contacts who issued a spam complaint after receiving the specified campaign

          > **NOTE**: Your account must be properly configured for Spam Complaint feedback loops for this metric to be available
        tags:
        - Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the campaign for which you are retrieving the complaint report.
          example: 885
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        default: null
                      account_id:
                        type: integer
                        example: 11370
                      campaign_id:
                        type: integer
                        example: 885
                      spreader_ip:
                        type: string
                        description: The Marketing Cloud IP address that the email originated from
                        example: "111.222.333.123"
                      email:
                        type: string
                        example: "johndoe@example.com"
                        format: email 
                      esp:
                        type: string
                        description: The mailbox provider that routed the complaint report back to Marketing Cloud
                        example: "yahoo"
                      created_at:
                        type: date-time
                        example: "2023-06-01T03:20:43.122-04:00"
                      total_pages:
                        type: integer
                        example: 8
                      uid:
                        type: string
                        example: "AB13EZ"
                      campaign_tags:
                        type: array
                        items:
                          - type: string
                            example: "affiliate"
                          - type: string
                            example: "promotions"

    # SMS Contact Lists
    "/accounts/:account_id/sms_lists.json":
      post:
        summary: Create SMS List
        description: Creates a new list of SMS contacts
        tags:
        - SMS Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  sms_list:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "Mobile Promotion Opt-ins"
                    required:
                      - name
                required:
                  - sms-list

    # SMS Contacts
    "/accounts/:account_id/sms_lists/:sms_list_id/sms_contacts.json":
      post:
        summary: Create SMS Contact
        description: Creates a new SMS contact and subscribes it to a specific SMS contact list
        tags:
        - SMS Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: sms_list_id
          in: path
          description: The ID of the SMS contact list to which the contact is to be subscribed
          example: 123
          schema:
            type: integer

        requestBody:
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    sms_contact:
                      type: object
                      properties:
                        phone_number:
                          type: string
                          description: The mobile number must include the country code
                          example: "15558675309"
                      required:
                        - phone_number
                    sms_subscription:
                      type: object
                      properties:
                        active:
                          type: boolean
                          example: "true"
                  required:
                  - sms_contact
                  - sms_subscription

    "/accounts/:account_id/sms_contacts/upsert.json":
      post:
        summary: Create/Update SMS Contact
        description: Creates a new SMS contact or updates an existing one
        tags:
        - SMS Contacts
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
              application/json:
                schema:
                  type: object
                  properties:
                    sms_contact:
                      type: object
                      properties:
                        uid:
                          type: string
                          example: "AB13EZ"
                        phone_number:
                          type: string
                          description: The mobile number must include the country code
                          example: "15558675309"
                        remove_from_sms_dnm:
                          type: boolean
                          default: false
                        sms_lists:
                          type: array
                          description: An array containing the IDs of the SMS Lists to subscribe the mobile contact to
                          items:
                            - type: integer
                              example: 6
                            - type: integer
                              example: 123
                      required:
                        - phone_number
                  required:
                    - sms-contact

    #SMS Campaigns
    "/accounts/:account_id/sms_campaigns.json":
      post:
        summary: Create a Promotional SMS Campaign
        description: Creates a new promotional SMS campaign.
        tags:
        - SMS Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
                schema:                  
                  oneOf:
                    - $ref: '#/components/schemas/schedule_sms'
                    - $ref: '#/components/schemas/send_test_sms'

    "/v2/:account_id/sms_campaigns.json":
      post:
        summary: Create a Transactional SMS Campaign
        description: Creates a new transactional SMS campaign object in your account.The transactional SMS campaign object must exist before it can be sent. This REST method presents an alternative to the user interface for creating the object.
        tags:
        - Transactional SMS Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  sms_campaign:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "Purchase Confirmation"
                      message:
                        type: string
                        example: "Confirmed! Your order {{tag.order_id}} has been placed. A notification will be sent when shipped."
                        description: The text can include emojis. However, note that emojis and other special characters -- including letters witih diacritics -- decreases the number of allowed characters per message.
                      from_number:
                        type: string
                        example: "+18881234567"
                        description: The toll-free number (or Sender ID) assigned to this Marketing Cloud account.
                      enable_click_tracking:
                        type: boolean
                        default: TRUE
                        description: Marketing Cloud gives you the option to use your custom domain for its link shortener service. If you haven't configured your account for one, then the text message will use Marketing Cloud's default shortened domain, **mpt1.co**.
                      organization_name:
                        type: string
                        description: A required Compliance Attribute. This should be the name of your business.
                        example: "Magellan Enterprises"
                      organization_link:
                        type: URL
                        description: A required Compliance Attribute. This should be a link to a page on your company web site.
                        example: "https://www.magellan.com"
                      opt-out:
                        type: boolean
                        default: TRUE
                        description: If FALSE, then the words "Text STOP to opt-out" will not be included in the text message.
                      compliance_order:
                        type: array
                        items:
                          - type: string
                            example: "organization_name"
                          - type: string
                            example: "message"
                          - type: string
                            example: "organization_link"
                        description: The left-to-right order of the message and Compliance Attributes that you define in this array will define the top-to-bottom order each attribute appears in the text message.
                      status:
                        type: string
                        example: "trans"
                        description: Set the static value of this attribute to **trans** in order to define this SMS Campaign object is to be used for Transactional SMS Campaigns. 
                    required:
                      - name
                      - message
                      - from_number
                      - organization_name
                      - organization_link
                      - compliance_order
                      - status
        responses:
          '201':
            description: A successfully created Transactional SMS Campaign object.
          '422':
            description: A payload error. Most common reasons are missing required elements or invalid attribute values.

    "/v2/:account_id/sms_campaigns/deliver.json":
      post:
        summary: Send a Transactional SMS Campaign
        description: Sends a transactional text message to an individual's mobile device. The transactional SMS campaign object must exist before it can be sent.
        tags:
        - Transactional SMS Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: The Marketing Cloud account ID.
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  sms:
                    type: object
                    properties:
                      sms_campaign_id:
                        type: integer
                        description: The ID of the Transactional SMS Campaign object created in your account.
                        example: 123456
                      message:
                        type: string
                        description: Include this optional attribute if you wish to override the default message to this specific individual.
                      from_number:
                        type: string
                        example: "+18881234567"
                        description: The toll-free number (or Sender ID) assigned to this Marketing Cloud account.
                      enable_click_tracking:
                        type: boolean
                        default: TRUE
                        description: If FALSE, then the words "Text STOP to opt-out" will not be included in the text message.
                      ignore_dnm:
                        type: boolean
                        default: FALSE 
                        description: If TRUE, then the mobile device will receive the text message even if its number is listed in the Do Not SMS List.
                      sms_contact:
                        type: string
                        example: "+6501234567"
                        description: The recipient's mobile number including country code.
                      sms_compliance:
                        type: object
                        description: Include this optional attribute only if you want to override the Compliance settings in the text message sent to this specific individual.
                        properties:
                          compliance_order:
                            type: array
                            description: Include this optional attribute only if you want to override the order of the message and the Compliance Attributes in the text message sent to this specific individual.
                            items:
                              - type: string
                                example: "organization_name"
                              - type: string
                                example: "message"
                              - type: string
                                example: "organization_link"
                          organization_name:
                            type: string
                            description: Include this optional attribute only if you want to override the one defined in the Transactional SMS Campaign object when sending the message to this specific individual.
                          organization_link:
                            type: URL 
                            description: Include this optional attribute only if you want to override the one defined in the Transactional SMS Campaign object when sending the message to this specific individual.
                          opt-out:
                            type: boolean
                            default: TRUE 
                            description: Include this optional attribute only if you want to override the one defined in the Transactional SMS Campaign object when sending the message to this specific individual.
                      tags:
                        type: object
                        description: _(Optional)_ Include this object when you want to provide the values for any substitution tags used in your Transactional SMS Campaign message. The properties listed in this object correspond to the names of the substitution tags used in your message body.
                        properties:
                          order_id:
                            type: string
                            example: "AB13EZ"
                    required:
                      - sms_campaign_id
                      - from_number
                      - sms_contact
        responses:
          '200':
            description: The transactional text message has been received and sent to the mobile aggregator for final delivery.
          '422':
            description: A payload error. Most common reasons are missing required elements or invalid attribute values.

    #Email Contact Lists
    "/accounts/:account_id/lists.json":
      get:
        summary: Get Lists
        description: Returns a list of all email contact lists
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: no_counts
          in: query
          description: Include this parameter for faster results when you don't need the list counts.
          schema:
            type: boolean
            default: false
        responses:
          '200':
            description: Successful operation
            content:
              application/json:
                schema:
                  "$ref": "#/components/schemas/lists_schema"
      
      post:
        summary: Create a List
        description: Creates a new email contact list
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
              application/json:
                schema:
                  type: object
                  properties:
                    list:
                      type: object
                      properties:
                        name:
                          type: string
                          example: "ClickBank Offer Buyers"
                        address:
                          type: string
                          example: "180 University Ave., Suite 5002, Toronto, ON, Canada, M5H 0A2"
                        from_name:
                          type: string
                          example: "Magellan Health"
                        from_email:
                          type: string
                          format: email
                          example: health@e.magellan.com
                        reply_to_email:
                          type: string
                          format: email
                          example: health@e.magellan.com
                        language:
                          type: string
                          description: |
                            Accepted values include the following:
                            * **en** - English
                            * **es** - Spanish
                            * **da** - Danish
                            * **de** - German
                            * **it** - Italian
                            * **fr** - French
                            * **nl** - Dutch
                            * **no** - Norwegian
                            * **pl** - Polish
                            * **pt** - Portuguese
                            * **sv** - Swedish
                            * **zh** - Chinese (Simplified)
                          example: en
                        add_to_unsubscribe_page:
                          type: boolean
                          description: Determines whether this List should appear on the hosted Manage Subscriptions page
                          default: false
                        post_url:
                          type: string
                          format: url
                          example: "https://callback.example.com/d6af-4cc8-aa7b-ce246f9e9c4c"
                        display_name:
                          type: string
                          description: The "friendly name" of the List as it would appear on the hosted Manage Subscriptions page
                          example: "ClickBank Offers"
                        description:
                          type: string
                          description: Additional information that would be displayed if this List were listed on the hosted Manage Subscriptions page
                          example: "Newsletters sent to customers who purchased a ClickBank offer"
                      required:
                        - name
                        - address
                        - language
                  required:
                    - list
    
    "/accounts/:account_id/lists/:id.json":
      get:
        summary: Get List
        description: Returns the details of the specified Email List
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the email contact list.
          example: 8440
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 8440
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: "ClickBank Offer Buyers"
                      address:
                        type: string
                        example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                      language:
                        type: string
                        example: en
                      from_name:
                        type: string
                        description: The default "friendly from name" of the email campaign using this List
                        example: "Magellan Health"
                      from_email:
                        type: string
                        format: email
                        description: The default from address of the email campaign using this List
                        example: health@e.magellan.com
                      reply_to_email:
                        type: string
                        format: email
                        description: |
                          The default "reply-to address" of the email campaign using this List

                          > **NOTE**: This address is not the return-path email address that is used for SPF validation.
                        example: health@e.magellan.com
                      add_to_unsubscribe_page:
                        type: boolean
                        description: Defines if this List appears in the hosted Manage Subscriptions page
                        default: false
                      refreshed_at:
                        type: date-time
                        example: '2023-06-05T08:32:24.045-04:00'
                      subscribers:
                        type: integer
                        example: 201209
                      unsubscribes:
                        type: integer
                        example: 4908
                      soft_bounces:
                        type: integer
                        example: 15093
                      hard_bounces:
                        type: integer
                        example: 107
                      post_url:
                        type: string
                        format: url
                        description: The external API endpoint that receives the webhook callback whenever there is a change to a contact's status in this List.
                        example: "https://callback.example.com/d6af-4cc8-aa7b-ce246f9e9c4c"
                      list_type:
                        type: string
                        description: |
                          * **normal** means this List can be used for either targeting or suppression
                          * **suppressed** means this List can be used only for suppression
                        example: "normal"
                      folder_id:
                        type: integer
                        example: 4
                      brand_id:
                        type: integer
                        description: Indicates which Brand this List is associated with
                        example: 134
                      crm_entity_id:
                        type: integer
                        example: 42
                      created_at:
                        type: date-time
                        example: '2023-06-05T08:32:24.045-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-05T08:32:24.045-04:00'
                      display_name:
                        type: string
                        description: The "friendly name" how this List will appear on the hosted Manage Subscriptions page
                        example: "ClickBank Offers"
                      description:
                        type: string
                        description: Additional information about this List when displayed on the hosted Manage Subscriptions page
                        example: "Newsletters sent to customers who purchased a ClickBank offer"
                      total_revenue:
                        type: float
                        example: 1230890.43
                      archived:
                        type: boolean
                        example: false
                      complaints_count:
                        type: integer
                        example: 10
                      status:
                        type: string
                        description: |
                          * **active** means this list is available for segmentation and for targeting
                          * **archived** means this list is archived and will not appear anywhere in the application except in the **Archives**
                        example: active
                      total_contacts_count:
                        type: integer
                        example: 221327
                      sms_subscribers:
                        type: integer
                        example: 12
                      sms_unsubscribers:
                        type: integer
                        example: 12
          '422':
            description: Unprocessable Entity
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    error:
                      type: string
                      example: "List is not present"

      put:
        summary: Update List
        description: Updates the details of the specified Email List
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the email contact list
          example: 8440
          schema:
            type: integer

        requestBody:
          content:
              application/json:
                schema:
                  type: object
                  properties:
                    list:
                      type: object
                      properties:
                        name:
                          type: string
                          example: "ClickBank Offer Buyers"
                        address:
                          type: string
                          example: "180 University Ave., Suite 5002, Toronto, ON, Canada, M5H 0A2"
                        from_name:
                          type: string
                          example: "Magellan Health"
                        from_email:
                          type: string
                          format: email
                          example: health@e.magellan.com
                        reply_to_email:
                          type: string
                          format: email
                          example: health@e.magellan.com
                        language:
                          type: string
                          description: |
                            Accepted values include the following:
                            * **en** - English
                            * **es** - Spanish
                            * **da** - Danish
                            * **de** - German
                            * **it** - Italian
                            * **fr** - French
                            * **nl** - Dutch
                            * **no** - Norwegian
                            * **pl** - Polish
                            * **pt** - Portuguese
                            * **sv** - Swedish
                            * **zh** - Chinese (Simplified)
                          example: en
                        add_to_unsubscribe_page:
                          type: boolean
                          example: false
                        post_url:
                          type: string
                          format: url
                          example: "https://callback.example.com/d6af-4cc8-aa7b-ce246f9e9c4c"
                        display_name:
                          type: string
                          description: The "friendly name" of the List as it would appear on the hosted Manage Subscriptions page
                          example: "ClickBank Offers"
                        description:
                          type: string
                          description: Additional information that would be displayed if this List were listed on the hosted Manage Subscriptions page
                          example: "Newsletters sent to customers who purchased a ClickBank offer"
                      required:
                        - name
                        - address
                        - language
                  required:
                    - list
      delete:
        summary: Delete List
        description: |
            Deletes the specified Email List.
            
            > **NOTE**: Deleting a list is not recommended because it could cause reporting issues if is was targeted to a campaign or if it was used in a segment.  Instead, consider archiving it. See: [Archive Managment](https://galaxy.maropost.com/s/article/Archive-Management)
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the email contact list.
          example: 8440
          schema:
            type: integer

    "/accounts/:account_id/lists/:id/refresh_count.json":
      get:
        summary: Refresh List Count
        description: Refreshes the count of contacts in the Email List
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the email contact list
          example: 8440
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
    
    "/accounts/:account_id/lists/:id/ftp_import.json":
      put:
        summary: Import List
        description: Creates/Updates Email Contacts by importing a file hosted on Marketing Cloud's FTP server
        tags:
          - Contact Lists
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the email contact list.
          example: 8440
          schema:
            type: integer

        requestBody:
          content:
              application/json:
                schema:
                  type: object
                  properties:
                    list:
                      type: object
                      properties:
                        ftp_file:
                          type: file
                          description: Supported file types include **.csv**, **.txt**, and **.zip**.  The ZIP file can contain one file only that is either a **.csv** or a **.txt** file type. 
                          example: /path/to/file.csv
                        delimiter:
                          type: string
                          description: Supported delimiters include **comma**, **tab**, **colon**, and **semi-colon**
                          example: comma
                        mappings:
                          type: object
                          description: |
                            The names of the attributes in this object are the names of the Email Contact standard fields and custom fields in your Marketing Cloud account.

                            Their values are the names of the fields in the header row of your import file.
                          properties:
                            email:
                              type: string
                              format: email
                              description: |
                                **REQUIRED** The field in the header row that contains the contacts' email addresses
                              example: email_address
                            first_name:
                              type: string
                              example: first_name
                            city:
                              type: string
                              example: city
                            membership_level:
                              type: string
                              example: member_level
                            subscribed:
                              type: string
                              description: |
                                The valid values for **subscribed** field in the import file include “**S**” for subscribed “**U**” for unsubscribed.

                                If the payload is missing the **subscribed** field from the **mappings** object, then all new email contacts are created as **subscribed** by default.
                              example: "subscription_status"
                        import_options:
                          type: object
                          properties:
                            import_new_contacts:
                              type: string
                              default: yes
                            update_contacts:
                              type: string
                              default: yes
                            disable_workflows:
                              type: string
                              description: This option only applies if the List is being used in a "New Subscription" trigger within a Journey.
                              default: yes
    
    
    # Transactional Email Campaign
    "/accounts/:account_id/transactional_campaigns.json":
      get:
        summary: Get Transactional Campaigns
        description: Returns a list of all transactional email campaigns
        tags:
        - Transactional Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 100880
                      name:
                        type: string
                        example: "Appointment Reminder"
                      account_id:
                        type: integer
                        example: 11370
                      content_id:
                        type: integer
                        description: The ID of email content used for this transactional campaign
                        example: 43060
                      from_email:
                        type: string
                        format: email
                        example: doctor@wvmvc.com
                      subject:
                        type: string
                        example: "Your Appointment Reminder"
                      reply_to:
                        type: string
                        format: email
                        example: doctor@wvmvc.com
                      from_name:
                        type: string
                        example: Doctor Bob
                      preheader:
                        type: string
                        example: "Please arrive at least 15 minutes early"
                      send_at:
                        type: date-time
                        description: _Not used for transactional campaigns_
                        default: null
                      sent_at:
                        type: date-time
                        description: _Not used for transactional campaigns_
                        default: null
                      status:
                        type: string
                        description: Will always be **trans**, indicating a Transactional Campaign
                        default: trans
                      test_campaign:
                        type: boolean
                        default: false
                      language:
                        type: string
                        example: en
                      address:
                        type: string
                        example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                      contacts_count:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      recurring:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      recurring_time:
                        type: date-time
                        description: _Not used for transactional campaigns_
                        default: null
                      parent_id:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      version_number:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      campaign_type:
                        type: integer
                        description: Will always be **1**, indicating a Transactional Campaign
                        default: 1
                      decided_by:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      winner_campaign_id:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      campaign_group_id:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      suppress_workflow:
                        type: boolean
                        description: _Not used for transactional campaigns_
                        default: false
                      email_preview_link:
                        type: boolean
                        example: true
                      send_optimization:
                        type: boolean
                        description: _Not used for transactional campaigns_
                        default: false
                      workflow_item_id:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      one_time:
                        type: boolean
                        description: _Not used for transactional campaigns_
                        default: false
                      folder_id:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      crm_name:
                        type: string
                        description: _Not used for transactional campaigns_
                        default: null
                      brand_id:
                        type: integer
                        example: 199
                      crm_campaign_id:
                        type: integer
                        description: _Not used for transactional campaigns_
                        default: null
                      created_at:
                        type: date-time
                        example: '2023-06-08T14:12:19.562-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-08T14:12:19.562-04:00'
                      total_pages:
                        type: integer
                        example: 4
                      campaign_tags:
                        type: array
                        description: A string array of Campaign Tags
                        items:
                          - type: string
                            example: "reminders"
                          - type: string
                            example: "email"

      post:
        summary: Create Transactional Campaign
        description: Creates a new transactional email campaign.
        tags:
        - Transactional Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "Appointment Reminder"
                      subject:
                        type: string
                        example: "Your Appointment Reminder"
                      preheader:
                        type: string
                        example: "Please arrive at least 15 minutes early"
                      from_name:
                        type: string
                        example: "Doctor Bob"
                      from_email:
                        type: string
                        format: email
                        example: doctor@wvmvc.com
                      reply_to:
                        type: string
                        format: email
                        example: doctor@wvmvc.com
                      content_id:
                        type: integer
                        description: The ID of email content to be used for this transactional campaign
                        example: 43060
                      email_preview_link:
                        type: boolean
                        example: true
                      address:
                        type: string
                        example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
                      language:
                        type: string
                        description: |
                          Accepted values include the following:
                          * **en** - English
                          * **es** - Spanish
                          * **da** - Danish
                          * **de** - German
                          * **it** - Italian
                          * **fr** - French
                          * **nl** - Dutch
                          * **no** - Norwegian
                          * **pl** - Polish
                          * **pt** - Portuguese
                          * **sv** - Swedish
                          * **zh** - Chinese (Simplified)
                        example: en
                      add_ctags:
                        type: array
                        description: |
                          A string array of Campaign Tags

                          > **NOTE**: The Campaign Tags must already exist in your account before you can apply them here in this method
                        items:
                          - type: string
                            example: "reminders"
                          - type: string
                            example: "email"

    "/accounts/:account_id/emails/deliver.json":
      post:
        summary: Send Transactional Campaign
        description: |
          Sends a transactional email campaign.

          A transactional campaign object
        tags:
        - Transactional Email Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/with_campaign_id'
                  - $ref: '#/components/schemas/with_content_body'
    
#Mobile Apps    
    "/accounts/:account_id/push_applications.json":
      get:
        summary: Get Mobile App Profiles
        description: Returns a list of mobile app profiles
        tags:
        - Mobile App Profiles
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "Magellan Loyalty App"
                      environment:
                        type: string
                        description: Either **production** or **sandbox**
                        example: production
                      content_image_url:
                        type: string
                        format: url
                        example: https://cdn-m4m.chd01.com/logo/icon-60_2x.png
                      ios_data:
                        type: object
                        properties:
                          ios_cert_passphrase:
                            type: string
                            example: password
                          ios_bundle_identifier:
                            type: string
                            example: com.your-company.your-app
                      android_data:
                        type: object
                        properties:
                          api_key:
                            type: string
                            example: xxxxxxxxxxxxxxxxxxxxxxxxx
                          package_name:
                            type: string
                            example: com.your-company.your-app
                      created_at:
                        type: date-time
                        example: '2023-06-08T12:44:19.143-04:00'
                      updated_at:
                        type: date-time
                        example: '2023-06-08T12:44:19.143-04:00'
      post:
        summary: Create Mobile App Profile
        description: Creates a new mobile app profile 
        tags:
        - Mobile App Profiles
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account D
          example: 11370
          schema:
            type: integer

        requestBody:
          content:
            application/json:
              schema:
                type: object
                properties:
                  push_application:
                    type: object
                    properties:
                      name:
                        type: string
                        example: "Magellan Loyalty App"
                      environment:
                        type: string
                        description: Either **production** or **sandbox**
                        example: production
                      content_image_url:
                        type: string
                        format: url
                        example: https://cdn-m4m.chd01.com/logo/icon-60_2x.png
                      ios_data:
                        type: object
                        properties:
                          ios_cert_passphrase:
                            type: string
                            example: password
                          ios_bundle_identifier:
                            type: string
                            example: com.your-company.your-app
                      android_data:
                        type: object
                        properties:
                          api_key:
                            type: string
                            example: xxxxxxxxxxxxxxxxxxxxxxxxx
                          package_name:
                            type: string
                            example: com.your-company.your-app
    "/accounts/:account_id/push_applications/:mobile_app_id.json":
      put:
        summary: Update Mobile App Profile
        description: Updates a mobile app's profile 
        tags:
        - Mobile App Profiles
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer

      delete:
        summary: Delete Mobile App Profile
        description: Deletes a mobile app's profile 
        tags:
        - Mobile App Profiles
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer


    "/accounts/:account_id/push_applications/:mobile_app_id/push_messages.json":
      get:
        summary: Get Mobile App Campaigns
        description: Returns a list of all mobile app campaigns sent from the specified mobile app profile
        tags:
        - Mobile App Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        - name: token
          in: query
          description: Include this parameter if you just want to retrieve the mobile app campaigns sent to a specific mobile app token ID
          schema:
            type: string
        responses:
          '200':
            description: Successful Operation
            content:
                application/json:
                  schema:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        account_id:
                          type: integer
                          example: 11370
                        push_application_id:
                          type: integer
                          example: 110
                        send_to:
                          type: object
                          properties:
                            type:
                              type: string
                              example: device_tokens
                            ios_tokens:
                              type: string
                              example:  "JVHGV7676JV887HJHVH..."
                            android_tokens:
                              type: string
                              example: ""
                        name:
                          type: string
                          example:  "smiley test"
                        message:
                          type: string
                          example: "This is what your message will look like ..."
                        data:
                          type: string
                          example: "{\"acme\":[\"data1\",\"data2\"],\"acme2\":{\"acme\":\"backme\"}}"
                        badge_count:
                          type: integer
                          example: 1
                        sound:
                          type: string
                          example: default
                        image_url:
                          type: string
                          format: url
                          example: "https://cdn-m4m.chd01.com/logo/dev_image.jpeg"
                        deep_linking_url:
                          type: string
                          format: url
                          example: "myapp://host/destinationPage"
                        title:
                          type: string
                          example: My title
                        sub_title:
                          type: string
                          example: My Subtitle
                        send_at:
                          type: string
                          example: "null"
                        sent_at:
                          type: string
                          example: "null"
                        status:
                          type: string
                          example: "draft"
                        created_at:
                          type: date-time
                          example:  "2023-06-21T02:09:15.501-04:00"
                        updated_at:
                          type: date-time
                          example:  "2023-06-21T02:09:15.501-04:00"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"

      post:
        summary: Create Mobile App Campaign
        description: Create a new mobile app campaign 
        tags:
        - Mobile App Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer


        requestBody:
            content:
              application/json:
                schema:
                  oneOf:
                  - $ref: '#/components/schemas/create_push_message'
                  - $ref: '#/components/schemas/in_app'
                  - $ref: '#/components/schemas/recurring_daily'
                  - $ref: '#/components/schemas/recurring_weekly'
                  - $ref: '#/components/schemas/recurring_monthly'
                  - $ref: '#/components/schemas/recurring_yearly'

    "/accounts/:account_id/push_applications/:mobile_app_id/push_devices/:mobile_message_id.json":
      delete:
        summary: Delete Mobile App Campaign
        description: Deletes a mobile app campaign 
        tags:
        - Mobile App Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        - name: mobile_message_id
          in: path
          description: ID of the mobile app campaign
          example: 12
          schema:
            type: integer


    "/accounts/:account_id/push_applications/:mobile_app_id/new_transactional_message.json":
      post:
        summary: Create Transactional Mobile App Campaign
        description: |
          * Customize your message or payload data with tags parameter and using format {{tag.tag_name}} in your message or data, ex: {{tag.event_name}} or {{tag.event_id}} in above example.<br/>
          * Personalize your message or payload data for individual devices with available fields: {{push_device.first_name}}, {{push_device.last_name}}, {{push_device.login_id}} or {{push_device.email}} <br/>
          * Allowed values for send_to -> type: 'all_devices', 'segment_ids', 'device_tokens' and 'login_ids'. <br/>
            -> For segment_ids, send a comma separated string of push segment IDs as an additional parameter named 'segment_ids' inside send_to param. <br/>
            -> For login_ids, send a comma separated string of login IDs as a parameter named 'login_ids' inside send_to param. <br/>
            -> For device_tokens, send a comma separated string of valid iOS device Tokens in a parameter named 'ios_tokens' and a comma separated string of valid Android registration IDs in a parameter named 'android_tokens' inside send_to parameter.<br/>
        tags:
        - Mobile App Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
 
        requestBody:
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    push_message:
                      type: object
                      properties:
                        send_to:
                          type: object
                          properties:
                            type:
                              type: string
                              example: all_devices
                        name:
                          type: string
                          example: smiley test
                        message:
                          type: string
                          example: Hey {{push_device.first_name}}, join us for {{tag.event_name}} ...
                        data:
                          type: string
                          example: "{\"event_id\":\"{{tag.event_id}}\",\"acme\":{\"acme\":\"backme\"}}"
                        tags:
                          type: object
                          properties:
                            event_name:
                              type: string
                              example: Product Launch at NYC
                            event_id:
                              type: integer
                              example: 23456789
                        badge_count:
                          type: integer
                          example: 1
                        sound:
                          type: string
                          example: default
                        image_url:
                          type: string
                          format: url
                          example: https://cdn-m4m.chd01.com/logo/dev_image.jpeg
                        deep_linking_url:
                          type: string
                          format: url
                          example: myapp://host/destinationPage
                        title:
                          type: string
                          example: My Title
                        sub_title:
                          type: string
                          example: My Subtitle

    "/accounts/:account_id/push_applications/:mobile_app_id/send_transactional_message.json":
      post:
        summary: Send Transactional Message
        description: |
          * Customize your message or payload data with tags parameter and using format {{tag.tag_name}} in your message or data, ex: {{tag.event_name}} or {{tag.event_id}} in above example. <br/>
          * Personalize your message or payload data for individual devices with available fields: {{push_device.first_name}}, {{push_device.last_name}}, {{push_device.login_id}} or {{push_device.email}}  <br/>
          * Allowed values for send_to -> type: 'all_devices', 'segment_ids', 'device_tokens' and 'login_ids'. <br/>
            -> For segment_ids, send a comma separated string of push segment IDs as an additional parameter named 'segment_ids' inside send_to param.  <br/>
            -> For login_ids, send a comma separated string of login IDs as a parameter named 'login_ids' inside send_to param.  <br/>
            -> For device_tokens, send a comma separated string of valid iOS device Tokens in a parameter named 'ios_tokens' and a comma separated string of valid Android registration IDs in a parameter named 'android_tokens' inside send_to parameter.  <br/>
          * If send_at parameter is not provided, push message is scheduled to be sent immediately regardless of send_at being set when creating the message. <br/>
        tags:
        - Mobile App Campaigns
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
 
        requestBody:
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    push_message:
                      type: object
                      properties:
                        push_message_id:
                          type: integer
                          example: 2
                        send_to:
                          type: object
                          properties:
                            type:
                              type: string
                              example: login_ids
                            login_ids:
                              type: string
                              example: 1,2,3
                        name:
                          type: string
                          example: smiley test
                        message:
                          type: string
                          example: Hey {{push_device.first_name}}, join us for {{tag.event_name}} ...
                        data:
                          type: string
                          example: "{\"event_id\":\"{{tag.event_id}}\",\"acme\":{\"acme\":\"backme\"}}"
                        tags:
                          type: object
                          properties:
                            event_name:
                              type: string
                              example: Product Launch at NYC
                            event_id:
                              type: integer
                              example: 23456789
                        badge_count:
                          type: string
                          example: "1"
                        sound:
                          type: string
                          example: default
                        send_at:
                          type: string
                          format: date-time
                          example: "2020-10-07T07:00:00.000-04:00"
                        image_url:
                          type: string
                          format: url
                          example: https://cdn-m4m.chd01.com/logo/dev_image.jpeg
                        deep_linking_url:
                          type: string
                          format: url
                          example: myapp://host/destinationPage
                        title:
                          type: string
                          example: My Title
                        sub_title:
                          type: string
                          example: My Subtitle

    "/accounts/:account_id/push_applications/:mobile_app_id/push_devices.json":
      get:
        summary: Get Mobile App Users
        description: Returns a list of all mobile app users that have installed the mobile app for this mobile app profile
        tags:
        - Mobile App Users
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      account_id:
                        type: integer
                        example: 11370
                      push_application_id:
                        type: integer
                        example: 110
                      token:
                        type: string
                        example: 378FBCD...55133394C
                      email:
                        type: string
                        format: email
                        example: email_id@email.com
                      latitude:
                        type: number
                        format: float
                        example: 30.707
                      longitude:
                        type: number
                        format: float
                        example: 76.8604
                      time_zone_offset:
                        type: number
                        format: float
                        example: 5.5
                      device_tags:
                        type: string
                        example: double||pipe||appended||keywords||
                      platform:
                        type: integer
                        example: 1
                      status:
                        type: string
                        example: "1"
                      language:
                        type: string
                        example: en
                      created_at:
                        type: string
                        format: date-time
                        example: '2023-06-01T13:07:25.492-04:00'
                      updated_at:
                        type: string
                        format: date-time
                        example: '2023-06-01T13:07:25.492-04:00'
                      login_id:
                        type: string
                        example: "24"
                      form_factor:
                        type: integer
                        example: 1
                      os_version:
                        type: string
                        example: "9.1.2"
                      first_name:
                        type: string
                        example: John
                      last_name:
                        type: string
                        example: Appleseed
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"

      post:
        summary: Create Mobile App User
        description: |
          * ApiKey url parameter is NOT required for this API call. Instead, it requires an app_key parameter
          * The app_key url parameter is required and is the unique key belonging to your mobile app profile (check your mobile app profile's details page for its value)<br/>
          * token and platform fields are required for mobile app users<br/>
            -> Allowed values for platform: '1' (for iOS) or '2' (for Android)<br/>
            -> Allowed values for status: '1' (for production) or '2' (for sandbox)<br/>
            -> Allowed values for form_factor: '1' (for mobile-phone) or '2' (for tablet)<br/>
        tags:
        - Mobile App Users
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        - name: app_key
          in: query
          description: The unique identifier of your Marketing Cloud mobile app profile
          example: AB342DEB12340
          required: true
          schema:
            type: string


        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/push_device_sc'

    "/accounts/:account_id/push_applications/:mobile_app_id/push_devices/:mobile_device_id.json?app_key=:app_key":
      put:
        summary: Update Mobile App User
        description: |
          Updates a mobile app user associated with a mobile app profile

          > **NOTE**: The ApiKey url parameter is NOT required for this API call. Instead, it requires an app_key parameter
        tags:
        - Mobile App Users
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        - name: mobile_device_id
          in: path
          description: The mobile app user's device ID
          example: 1
          schema:
            type: integer
        - name: app_key
          in: query
          description: app key
          example: :app_key
          schema:
            type: string

        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/push_device_sc'

    "/accounts/:account_id/push_applications/:mobile_app_id/push_devices/:mobile_device_id.json":
      delete:
        summary: Delete Mobile App User
        description: Deletes a mobile app user by referencing its mobile device ID
        tags:
        - Mobile App Users
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11307
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        - name: mobile_device_id
          in: path
          description: The mobile app user's device ID
          example: 1
          schema:
            type: integer


    "/accounts/:account_id/push_applications/:mobile_app_id/push_segments.json":
      get:
        summary: Get Mobile Segments
        description: Returns a list of all segments for the specified mobile app profile
        tags:
        - Mobile Segments
        security:
        - ApiKey: []
        parameters:
        - name: account_id
          in: path
          description: Marketing Cloud Account ID
          example: 11370
          schema:
            type: integer
        - name: mobile_app_id
          in: path
          description: ID of the mobile app profile
          example: 110
          schema:
            type: integer
        responses:
          '200':
            description: Successful Operation
            content:
              application/json:
                schema:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      account_id:
                        type: integer
                        example: 11370
                      name:
                        type: string
                        example: Test segment
                      push_application_id:
                        type: integer
                        example: 110
                      match_all:
                        type: string
                        example: "true"
                      contacts_count:
                        type: string
                        example: "0"
                      created_at:
                        type: string
                        format: date-time
                        example: "2023-06-20T01:47:01.080-04:00"
                      updated_at:
                        type: string
                        format: date-time
                        example: "2023-06-20T01:47:01.080-04:00"
                      refreshed_at:
                        type: string
                        format: date-time
                        example: "null"
          '404':
            description: Not Found
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: integer
                      example: 404
                    error:
                      type: string
                      example: "Not Found"
#    "/accounts/:account_id/push_applications/:push_application_id/push_event_trackings/event.json?ApiKey=:api_key":
#      post:
#        summary: To create Push Event Tracking
#        tags:
#        - Push Event Tracking
#        security:
#        - ApiKey: []
#        parameters:
#        - name: account_id
#          in: path
#          example: 110
#          schema:
#            type: integer
#        - name: push_application_id
#          in: path
#          example: 170
#          schema:
#            type: integer
#        - name: ApiKey
#          in: query
#          example: api_key
#          schema:
#            type: string
#        requestBody:
#          content:
#            application/json:
#              schema:
#                oneOf:
#                  - $ref: '#/components/schemas/added_to_cart'
#                  - $ref: '#/components/schemas/removed_from_cart'
#                  - $ref: '#/components/schemas/started_checkout'
#                  - $ref: '#/components/schemas/finished_checkout'
#                  - $ref: '#/components/schemas/started_content'
#                  - $ref: '#/components/schemas/finished_content'
#                  - $ref: '#/components/schemas/custom_event'


    "/accounts/:account_id/graphql.json":
      post:
        summary: Get contacts
        tags:
          - Contacts(GraphQL)
        security:
          - ApiKey: []
        parameters:
          - name: account_id
            in: path
            description: Marketing Cloud Account ID
            example: 11370
            schema:
              type: integer

        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contacts(GraphQL)' 

    "/accounts/:accountid/graphql.json":
      post:
        summary: Get campaign delivery and response
        tags:
          - Campaigns(GraphQL)
        security:
          - ApiKey: []
        parameters:
          - name: accountid
            in: path
            description: Marketing Cloud Account ID
            example: 11370
            schema:
              type: integer

        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaigns(GraphQL)'

    "/accounts/:your_account_id/graphql.json":
      post:
        summary: Get Journey campaign delivery and response
        tags:
          - Journeys(GraphQL)
        security:
          - ApiKey: []
        parameters:
          - name: your_account_id
            in: path
            description: Marketing Cloud Account ID
            example: 11370
            schema:
              type: integer

        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/journeys(GraphQL)'

    "/accounts/:mmc_accountid/graphql.json":
      post:
        summary: Get customer purchase order history
        tags:
          - Orders(GraphQL)
        security:
          - ApiKey: []
        parameters:
          - name: mmc_accountid
            in: path
            description: Marketing Cloud Account ID
            example: 11370
            schema:
              type: integer

        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/orders(GraphQL)'

    "/accounts/:mmc_account_id/graphql.json":
      post:
        summary: Get products from the Product Catalog
        tags:
          - Products(GraphQL)
        security:
          - ApiKey: []
        parameters:
          - name: mmc_account_id
            in: path
            description: Marketing Cloud Account ID
            example: 11370
            schema:
              type: integer

        requestBody:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/products(GraphQL)'



  tags:
  
  - name: Email Campaigns
    description: |
        Email campaigns help you communicate and engage with your current and potential customers to promote your brand and increase overall sales. To learn about Email Campaigns, see [Email Campaigns: Overview](https://galaxy.maropost.com/s/article/Email-Campaigns-Overview).
        
        You can use the Email Campaigns APIs to create and schedule an email campaign, retrieve details of an email campaign, and get various campaign metrics.
      
  - name: Transactional Email Campaigns
    description: |
        Transactional Email Campaigns are recipient-specific emails that are sent when triggered by an event or user action. You can use the Transactional Campaigns APIs to find, create, and send the Transactional Campaigns.
        
        To learn about creating Transactional emails in the Marketing Cloud application interface, see [Creating Transactional Email Campaigns](https://galaxy.maropost.com/s/article/Creating-Transactional-Email-Campaigns).

        Marketing Cloud also supports an SMTP pathway for creating and sending Transactional Email Campaigns.  See [Sending Transactional Campaigns via SMTP](https://galaxy.maropost.com/s/article/Sending-Transactional-Campaigns-via-SMTP) for more information.

  - name: SMS Campaigns
    description: |
        SMS Campaigns enable you to send text messages to the list of contacts who have consented to receive promotional SMS from you. To learn about SMS Campaigns, see [Introduction to SMS Campaigns](https://galaxy.maropost.com/s/article/Introduction-to-SMS-Campaigns).
        
        You can use the SMS Campaigns APIs to create and manage the SMS campaigns and SMS contacts.

  - name: Transactional SMS Campaigns
    description: |
        Transactional SMS are automated messages triggered by an event or user action. For example, an order confirmation SMS, event reminder SMS, forgot password SMS, and so on. Marketing Cloud enables you to create, manage, and send transactional SMS campaigns.

        Transactional SMS campaigns are different from promotional SMS campaigns. While the latter focus on advertising and marketing products and services, the former are instrumental in providing relevant information to customers in a timely manner.

        **IMPORTANT!** North American wireless carriers require separate verifications for toll-free numbers that are used for transactional and those that are used for promotional messages.

  - name: Custom Fields
    description: Custom fields are attributes for your email contacts.

  - name: Contact Tags
    description: Contact tags can be used for segmentation and to trigger a contact's entrance into a Journey.
    
  - name: Secure Lists
    description: A Secure List is a special type of suppression list that contains MD5-hashed email addresses only.
    
  - name: Do Not Mail List
    description: The General Do Not Mail list is a permanent suppression list that ensures the contacts present in will not receive any emails that are unassociated with any particular Brand.
  
  - name: Brands Do Not Mail List
    description: |
        The Brands' Do Not Mail lists are for any campaign using Marketing Cloud's Brand Management feature.  Each Brand has its own permanent suppression list that ensures the contacts in it will not receive any emails from campaigns that are sent from a particular Brand.
    
        For more information, see [Suppression (Do Not Mail Lists)](https://galaxy.maropost.com/s/article/Suppression-Do-Not-Mail-Lists).

  - name: Relational Tables
    description:
        Marketing Cloud enables you to use Relational Tables to store data in a structured format within your own mini-datamart.
    
  - name: Journeys
    description: |
        The Journeys feature enables you to create automated workflows for sending messages to specific contacts at the right time. You can use various elements (also called widgets) – namely **Triggers**, **Actions**, **Filtesr**, **Delay**, and **End** – to define the workflow that will be executed when the trigger event happens.
        
        For more information, see [Introduction to Journeys](https://galaxy.maropost.com/s/article/Introduction-to-Journeys).
        
        The Journeys APIs can be used to retrieve various Journey-related information (for example, all the contacts in a Journey, all the campaigns in a journey, all the Journeys in your account) and to update the Journey statuses (for example, stop/pause/restart/reset the Journey).
    
  
  - name: Contact Lists
    description: |
        The Contact Lists (also referred as Lists) are used for storing contact details. To learn about Lists, see [Contact Lists: Overview](https://galaxy.maropost.com/s/article/Contact-Lists-Overview).
        
        You can use the Contact Lists APIs to create and manage the Lists. For adding and managing the contacts in the Lists, please refer to the Email Contacts APIs.
    
    
  - name: Contacts
    description: |
        The Contacts are your customers to whom you plan to send campaigns. While Marketing Cloud supports various methods for adding and using contacts (Lists, APIs, Relational Tables), Lists are the most convinient and also the recommended one.
        
        You can use the Contacts APIs to create, search for, and manage your contacts.
   
  - name: SMS Contact Lists
    description: SMS Contact Lists are used for sending bulk SMS Campaigns.
    
  - name: SMS Contacts
    description: SMS Contacts are the recipients of your bulk SMS Campaigns.

  - name: Content
    description: Create and manage content for your email campaigns.
    
  - name: Content Templates
    description: Create and manage reusable templates for your email content. 
  
  - name: Content Image
    description: Upload images to your Marketing Cloud Image Library.
    
  - name: Growth And Attrition Reports
    description: |
        The Growth and Attrition report contains metrics on user growth and attrition that helps you understand how your contact lists are growing or shrinking.
        
        You can use the Growth and Attrition Reports APIs to create a new report and retrieve a report.

        **NOTE:** The URL path for reports includes "/v2/"
    
    
  - name: Reports
    description: The Reports APIs can be used to create, retrieve, and delete various reports including campaign metrics reports, custom reports, and so on.
    
    
    
  - name: Orders
    description: |
        The Orders API methods enable you to manage your customers' product purchase history within your Marketing Cloud account.
        
        To learn more, see [Introduction to Product and Revenue Tracking](https://galaxy.maropost.com/s/article/Introduction-to-Product-and-Revenue-Tracking).
        
        > Note that for tracking campaign conversions, implementing the process of storing and passing Campaign ID remains your responsibility.
    
  - name: Products 
    description: By default, all products included when creating or updating an Order are automatically appended to your Marketing Cloud account's Product Catalog.  You can however, choose to add or update products in your Product Catalog directly by using these methods.


  - name: Abandoned Cart
    description: This group of REST methods enables you to register your web store with Marketing Cloud so that it acts as an event listener. Then, when you detect an abandoned cart event on your web store, you can trigger the webhook within an [Abandoned Cart Remarketing Journey](https://galaxy.maropost.com/s/article/Abandoned-Cart-Journey-Template).

    
  - name: Mobile App Profiles
    description: Endpoints related to registering a Mobile App to utilize Marketing Cloud's Mobile Messaging SDK
  - name: Mobile App Campaigns
    description: Endpoints related to Mobile App Messaging
  - name: Mobile App Users
    description: Endpoints related to mobile app users that have installed a mobile app using Marketing Cloud's Mobile SDK
  - name: Mobile Segments
    description: Endpoints related to Mobile App User segments
#  - name: Push Event Tracking
#    description: Endpoints related to Push Event Tracking
    # x-displayName: Custom tag name - trait tag

  # - name: Sending Domains
  #   description: Endpoints related to Sending Domains
  # - name: Tracking Domains
  #   description: Endpoints related to Tracking Domains
  # - name: Transmissions
  #   description: Endpoints related to Transmissions
  # - name: Webhooks
  #   description: Endpoints to manage Webhooks

  - name: Contacts(GraphQL)
    description: |
      The Contacts top-level object includes the following optional query arguments:
      * **ids** - a comma-separated string of contact IDs.
      * **email** - a comma-separated string of email addresses.
      * **UID** - a comma-separated string of contact Unique Identifiers.
      * **from_created_at** - selects contacts from a date range according to their record creation date.  Enter the string in 'yyyy-mm-dd' format.
      * **to_created_at** - selects contacts from a date range according to their record creation date.  Enter the string in 'yyyy-mm-dd' format.
      * **from_updated_at** - selects contacts from a date range according to their record update date.  Enter the string in 'yyyy-mm-dd' format.
      * **to_updated_at** - selects contacts from a date range according to their record update date.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_tag_assigned_from** - selects contacts from a date range according to when a contact was tagged.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_tag_assigned_to** - selects contacts from a date range according to when a contact was tagged.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_subscribed_from** - selects contacts from a date range according to when a contact was subscribed to a list.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_subscribed_to** - selects contacts from a date range according to when a contact was subscribed to a list.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_unsubscribed_from** - selects contacts from a date range according to when a contact was unsubscribed from a list.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_unsubscribed_to** - selects contacts from a date range according to when a contact was unsubscribed from a list.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_order_from** - selects contacts from a date range according to when a contact's order was originally created within the commerce system.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_order_to** - selects contacts from a date range according to when a contact's order was originally created within the commerce system.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_order_created_from** - selects contacts from a date range according to when a contact's order record was created within Marketing Cloud.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_order_created_to** - selects contacts from a date range according to when a contact's order record was created within Marketing Cloud.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_order_updated_from** - selects contacts from a date range according to when a contact's order record was last updated within Marketing Cloud.  Enter the string in 'yyyy-mm-dd' format.
      * **contact_order_updated_to** - selects contacts from a date range according to when a contact's order record was last updated within Marketing Cloud.  Enter the string in 'yyyy-mm-dd' format.
      * **per** - allows you to set the number of records returned in the response payload.
      * **page** - allows you to iterate through each virtual "page" of output.

  - name: Campaigns(GraphQL)
    description: |
      The Campaigns top-level object returns aggregated delivery and response metrics for the selected campaign(s).

      It also allows you to retrieve delivery and response metrics for each individual contact within the same response payload.

      The Campaigns top-level object includes the following optional query arguments:
      * **ids** - a comma-separated string of campaign IDs.
      * **from** - use this argument when you want to select campaigns sent within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **to** - use this argument when you want to select campaigns sent within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **type** - allows you to select campaigns based on their type.
        * draft - a campaign that is in DRAFT mode.
        * sent - a campaign that has been sent.
        * locked - a campaigns whose "pre-send calculation" option was enabled, and the current time is within 3 hours prior to the scheduled send time.
        * jrny - a campaign used within a Journey.
        * scheduled - campaign that has been scheduled but not yet sent.
        * recurring - a campaign that is from a series of recurring-scheduled campaigns.
      * **per** - allows you to set the number of records returned in the response payload.
      * **page** - allows you to iterate through each virtual "page" of output.

  - name: Journeys(GraphQL)
    description: |
      The Journeys top-level object returns aggregated delivery and response metrics for journeys.

      It also allows you to retrieve delivery and response metrics for each individual journey campaign within the same response payload.

      The Journeys top-level object includes the following optional query arguments:
      * **id** - a comma-separated string of Journey IDs.
      * **journey_from** - use this argument when you want to select journeys created within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **journey_to** - use this argument when you want to select journeys created within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **from** - use this argument when you want to select journey campaigns sent within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **to** - use this argument when you want to select journey campaigns sent within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **per** - allows you to set the number of records returned in the response payload.
      * **page** - allows you to iterate through each virtual "page" of output.


  - name: Orders(GraphQL)
    description: |
      The Orders top-level object returns your customers' product purchase history captured by your commerce system and stored in your Marketing Cloud account.

      To learn more, see [Introduction to Product and Revenue Tracking](https://galaxy.maropost.com/s/article/Introduction-to-Product-and-Revenue-Tracking)

      The Orders top-level object includes the following optional query arguments:
      * **ids** - a comma-separated string of Order IDs (the IDs of the Order records created in Marketing Cloud).
      * **from** - use this argument when you want to select orders created in your commerce system within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **to** - use this argument when you want to select orders created in your commerce system within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **per** - allows you to set the number of records returned in the response payload.
      * **page** - allows you to iterate through each virtual "page" of output.

  - name: Products(GraphQL)
    description: |
      The Products top-level object returns products from your Product Catalog stored in Marketing Cloud.

      To learn more, see [Introduction to Product and Revenue Tracking](https://galaxy.maropost.com/s/article/Introduction-to-Product-and-Revenue-Tracking)

      The Orders top-level object includes the following optional query arguments:
      * **ids** - a comma-separated string of Product IDs (the IDs of the Product records created in Marketing Cloud).
      * **from** - use this argument when you want to select products created within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **to** - use this argument when you want to select products created within a date range.  Enter the string in 'yyyy-mm-dd' format.
      * **per** - allows you to set the number of records returned in the response payload.
      * **page** - allows you to iterate through each virtual "page" of output.


  x-tagGroups:
  - name: Reports
    tags:
    - Growth And Attrition Reports
    - Reports
  - name: Campaigns
    tags:
    - Email Campaigns
    - Transactional Email Campaigns
    - SMS Campaigns
    - Transactional SMS Campaigns
  - name: Lists and Contacts
    tags:
    - Contact Lists
    - Contacts
    # SMS CONTACT AND LISTS ARE NOW MERGED IN THE CONTACTS LIST AND CONTACTS
    # - SMS Contact Lists
    # - SMS Contacts
  - name: Contact Attributes
    tags:
    - Custom Fields
    - Contact Tags
  - name: Relational Tables
    tags:
    - Relational Tables
  - name: Suppression Lists
    tags:
    - Do Not Mail List
    - Brands Do Not Mail List
    - Secure Lists
  - name: Content
    tags:
    - Content
    - Content Image
    - Content Templates
  - name: E-Commerce
    tags:
    - Orders
    - Products
    - Abandoned Cart
  - name: Journeys
    tags:
    - Journeys
  - name: Mobile App Messaging
    tags:
    - Mobile App Profiles
    - Mobile App Campaigns
    - Mobile App Users
    - Mobile Segments
#    - Push Event Tracking
  - name: GraphQL API
    tags:
    - Contacts(GraphQL)
    - Campaigns(GraphQL)
    - Journeys(GraphQL)
    - Orders(GraphQL)
    - Products(GraphQL)

  servers:
  - url: https://api.maropost.com
    description: Maropost Production API server

  securitySchemes:
  - ApiKey: []

  components:
    securitySchemes:
      ApiKey:
        description: The API Key created within your Marketing Cloud account.
        type: apiKey
        in: header
        name: authorization
    UnauthorizedError:
      description: API key is missing or invalid
      headers:
        WWW_Authenticate:
          schema:
            type: string
    schemas:
      Email:
        type: object
        properties:
          general_unsubscribe:
            type: object
            properties:
              email:
                type: string
                example: "johndoe@eexample.com"
            required:
            - email
      UID:
        title: uid
        type: object
        properties:
          general_unsubscribe:
            type: object
            properties:
              uid:
                type: string
                example: "AB13EZ"
            required:
            - uid
      email:
        type: object
        properties:
          brand_unsubscribe:
            type: object
            properties:
              email:
                type: string
                example: "demo@email.com"
              brand_name:
                type: string
                example: "ABC Brand"
            required:
              - email
              - brand_name
      uid:
        type: object
        properties:
          brand_unsubscribe:
            type: object
            properties:
              uid:
                type: string
                example: "AB13EZ"
              brand_name:
                type: string
                example: "ABC Brand"
            required:
              - uid
              - brand_name
      campaign:
        type: object
        properties:
          id:
            type: integer
            example: 1
          account_id:
            type: integer
            example: 11370
          name:
            type: string
            example: "Loyalty Campaign"
          content-id:
            type: integer
            example: 445
          from-name:
            type: string
            example: Magellan Enterprises
          from-email:
            type: string
            format: email
            example: loyalty@magellan.com
          subject:
            type: string
            example: Your Loyalty Points Upgrade
          reply-to:
            type: string
            format: email
            example: loyalty@magellan.com
          created_at:
            type: date-time
            example: '2023-06-01T13:07:25.441-04:00'
          updated_at:
            type: date-time
            example: '2023-06-01T13:07:25.441-04:00'
          language:
            type: string
            example: en
          address:
            type: string
            example: "565 Willow Road | Suite 24 | Palo Alto, CA | 94025"
          campaign-type:
            type: integer
            example: 4
          campaign-group-id:
            type: integer
            nullable: true
            example: null
          email-preview-link:
            type: boolean
            example: true
          preheader:
            type: string
            example: xyz
          total-pages:
            type: integer
            example: 1
          campaign-tags:
            type: array
            items:
              type: string
            example:
            - new test2
            - new test3

      contact:
        type: object
        properties:
          id:
            type: integer
            example: 42817337
          account_id:
            type: integer
            example: 11370
          email:
            type: string
            format: email
            example: johndoe@example.com
          phone: 
            type: string
            example: "+1-555-555-5555"
          first_name:
            type: string
            example: John
          last_name:
            type: string
            example: Doe
          created_at:
            type: date-time
            example: '2023-05-22T01:48:37.094-04:00'
          updated_at:
            type: date-time
            example: '2023-05-22T01:48:37.094-04:00'
          engagement_score:
            description: A value automatically calculated based on the contact's brand engagment including site visits and email responses.
            type: number
            example: 323
          rfm_score:
            description: A value automatically calculated based on the contact's purchase history.
            type: number
            example: 5
          custom_field_boolean:
            type: boolean
            example: false
          custom_field_datetime:
            type: date-time
            example: '2023-05-22T01:48:37.094-04:00'
          custom_field_string:
            type: string
            example: "Gold Membership"
          uid:
            type: string
            example: AB13EZ
          orders:
            type: array
            items:
              - type: object
                properties:
                  order_id:
                    type: integer
                    description: The Order ID assigned by Marketing Cloud when created within your account
                    example: 16
                  order_date:
                    type: date-time
                    description: The timestamp when the Order was captured in the eCommerce platform
                    example: '2023-05-22T01:48:37.094-04:00'
                  grand_total:
                    type: float
                    description: In USD currency
                    example: 49.00
                  original_order_id:
                    type: string
                    description: The Order ID assigned by the eCommerce platform
                    example: N142
                  products_purchased:
                    type: string
                    example: "Your Best Emails - hardcover book"
                  order_status:
                    type: string
                    example: SALE
              - type: object
                properties:
                  order_id:
                    type: integer
                    description: The Order ID assigned by Marketing Cloud when created within your account
                    example: 340
                  order_date:
                    type: date-time
                    description: The timestamp when the Order was captured in the eCommerce platform
                    example: '2023-05-22T01:48:37.094-04:00'
                  grand_total:
                    type: float
                    description: In USD currency
                    example: 14.99
                  original_order_id:
                    type: string
                    description: The Order ID assigned by the eCommerce platform
                    example: N145
                  products_purchased:
                    type: string
                    example: "MCT Oil Powder Form - 32oz"
                  order_status:
                    type: string
                    example: SALE                      
          list_subscriptions:
            type: array
            items:
              - type: object
                properties:
                  list_id:
                    type: integer
                    example: 17
                  name:
                    type: string
                    example: "Goldstar Members"
                  status:
                    type: string
                    example: Subscribed
                  created_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
                  updated_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
              - type: object
                properties:
                  list_id:
                    type: integer
                    example: 1309
                  name:
                    type: string
                    example: "ClickBank Buyers"
                  status:
                    type: string
                    example: Subscribed
                  created_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
                  updated_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
          workflows:
            type: array
            items:
              type: object
              properties:
                id:
                  type: integer
                  example: 65
                name:
                  type: string
                  example: "Glutathione Product Replenishment Reminder"
                workflow_contact_status:
                  type: string
                  example: Active
                workflow_status:
                  type: string
                  example: Enabled
                created_at:
                  type: date-time
                  example: '2023-05-23T01:47:00.665-04:00'
                updated_at:
                  type: date-time
                  example: '2023-05-23T01:47:00.665-04:00'
          tags:
            type: array
            items:
              - type: object
                properties:
                  name:
                    type: string
                    example: "workflow started"
                  created_at:
                    type: date-time
                    example: '2023-05-23T01:47:00.665-04:00'
              - type: object
                properties:
                  name:
                    type: string
                    example: "replenishment needed"
                  created_at:
                    type: date-time
                    example: '2023-05-23T01:47:00.665-04:00'
          sms_list_subscriptions:
            type: array
            items:
              - type: object
                properties:
                  list_id:
                    type: integer
                    example: 17
                  name:
                    type: string
                    example: "Goldstar Members"
                  active:
                    type: boolean
                    example: true
                  created_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
                  updated_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
              - type: object
                properties:
                  list_id:
                    type: integer
                    example: 1309
                  name:
                    type: string
                    example: "ClickBank Buyers"
                  active:
                    type: boolean
                    example: true
                  created_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
                  updated_at:
                    type: date-time
                    example: '2023-05-22T01:48:37.094-04:00'
      order_schema:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 33
            account_id:
              type: integer
              example: 11370
            grand_total:
              type: float
              example: 137.03
            order_date:
              type: date-time
              example: '2023-06-01T13:07:25.445-04:00'
            order_status:
              type: string
              example: SALE
            contact_id:
              type: integer
              example: 5416596
            original_order_id:
              type: string
              example: "N142"
            created_at:
              type: date-time
              example: '2023-06-01T13:07:25.445-04:00'
            updated_at:
              type: date-time
              example: '2023-06-01T13:07:25.445-04:00'
            website_id:
              type: string
              example: null
            campaign_id:
              type: integer
              example: 98223
            source_name:
              type: string
              example: "myShop.neto.com.au"
              description: The URL of the web store
            source_type:
              type: string
              example: neto
              description: The type of eCommerce site of your webstore
            coupon_code:
              type: string
              example: "DISCOUNT-50"
            order_items:
              type: array
              items:
                - type: object
                  properties:
                    contact_id:
                      type: integer
                      example: 5416596
                    price:
                      type: float
                      example: 12.35
                    quantity:
                      type: integer
                      example: 3
                    total:
                      type: float
                      example: 37.05
                    item_id:
                      type: string
                      description: The Product SKU
                      example: "BLESH012"
                - type: object
                  properties:
                    contact_id:
                      type: integer
                      example: 5416596
                    price:
                      type: float
                      example: 49.99
                    quantity:
                      type: integer
                      example: 2
                    total:
                      type: float
                      example: 99.98
                    item_id:
                      type: string
                      description: The Product SKU
                      example: "NAT53985"
            products:
              type: array
              items:
                - type: object
                  properties:
                    item_id:
                      type: string
                      description: The Product SKU
                      example: "BLESH012"
                    name:
                      type: string
                      example: "Blue Eyeliner"
                    description:
                      type: string
                      example: "Blue Eyeliner with Aloe"
                    adcode:
                      type: string
                      example: null
                    category:
                      type: string
                      example: Cosmetics
                    image_url:
                      type: string
                      format: url
                      description: Full URL of the product image
                      example: "https://myShop.neto.com.au/products/product_image.jpeg"
                    store_url:
                      type: string
                      format: url
                      description: Full URL of the product's landing page
                      example: "https://myShop.neto.com.au/products/product_landing_page.html"
                    status:
                      type: boolean
                      example: true
                      description: Is this product currently available for sale in the web store?
                    availability:
                      type: integer
                      description: How many items are currently in inventory for sale?
                      example: 5000
                    brand:
                      type: string
                      example: "Max Factor"
                    published:
                      type: boolean
                      description: Is this product currently visible in the web store?
                      example: true
                - type: object
                  properties:
                    item_id:
                      type: string
                      description: The Product SKU
                      example: "NAT53985"
                    name:
                      type: string
                      example: "Naturale Bodywash"
                    description:
                      type: string
                      example: "Naturale Brightening Pomegranate Bodywash 32oz"
                    adcode:
                      type: string
                      example: null
                    category:
                      type: string
                      example: Cosmetics
                    image_url:
                      type: string
                      format: url
                      description: Full URL of the product image
                      example: "https://myShop.neto.com.au/products/product_image.jpeg"
                    store_url:
                      type: string
                      format: url
                      description: Full URL of the product's landing page
                      example: "https://myShop.neto.com.au/products/product_landing_page.html"
                    status:
                      type: boolean
                      example: true
                      description: Is this product currently available for sale in the web store?
                    availability:
                      type: integer
                      description: How many items are currently in inventory for sale?
                      example: 5000
                    brand:
                      type: string
                      example: "Naturale"
                    published:
                      type: boolean
                      description: Is this product currently visible in the web store?
                      example: true
      order_update:
        type: object
        properties:
          order:
            type: object
            properties:
              order_date:
                type: date-time
                example: '2023-10-13T18:05:24-04:00'
              order_status:
                type: string
                example: SHIPPED
              campaign_id:
                type: integer
                example: 98223
              coupon_code:
                type: string
                example: DISCOUNT-50
              order_items:
                type: array
                items:
                  type: object
                  properties:
                    item_id:
                      type: string
                      description: The Product SKU
                      example: "BLESH012"
                    price:
                      type: float
                      example: 12.35
                    quantity:
                      type: integer
                      example: 3
                    name:
                      type: string
                      example: "Blue Eyeliner"
                    description:
                      type: string
                      example: "Blue Eyeliner with Aloe"
                    adcode:
                      type: string
                      example: null
                    category:
                      type: string
                      example: Cosmetics
                    image_url:
                      type: string
                      example: "https://myShop.neto.com.au/products/product_image.jpeg"
                      format: url
                    store_url:
                      type: string
                      example: "https://myShop.neto.com.au/products/product_landing_page.html"
                      format: url
                    status:
                      type: boolean
                      example: true
                    availability: 
                      type: integer
                      example: 100
                    brand:
                      type: string
                      example: "Max Factor"
                    published:
                      type: boolean
                      example: true

      email_not_found:
        type: object
        properties:
          message:
            type: string
            example: "Invalid Email! - Email not found."
      uid_not_found:
        type: object
        properties:
          message:
            type: string
            example: "Invalid UID! - No such unique identifier found."

      saved_as_draft_campaign:
        title: Saved As Draft
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: "Campaign Final"
              subject:
                type: string
                example: "Testing"
              preheader:
                type: string
                example: "Preheader Testing"
              from_name:
                type: string
                example: "Test"
              from_email:
                type: string
                format: email
                example: "test@gmail.com"
              reply_to:
                type: string
                format: email
                example: "test@gmail.com"
              content_id:
                type: string
                example: "162"
              email_preview_link:
                type: boolean
                default: true
                example: true
              address:
                type: string
                example: "Canada"
              language:
                type: string
                example: "en"
              list_ids:
                type: array
                items:
                  type: string
                example:
                  - "15"
                  - "24"
              suppressed_list_ids:
                type: array
                items:
                  type: string
                example:
                  - "5"
                  - "70"
              segment_ids:
                type: array
                items:
                  type: string
                example:
                  - "5"
                  - "70"
              relational_table_ids:
                type: array
                items:
                  type: string
                example:
                  - "201"
                  - "153"
              suppressed_segment_ids:
                type: array
                items:
                  type: string
                example:
                  - "5"
                  - "70"
              add_ctags:
                type: array
                items:
                    type: string
                example:
                  - "ctag_name1"
                  - "ctag_name2"
              status:
                type: string
                example: "draft"
      saved_test_campaign:
        title: Send Test
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: "Campaign Final"
              subject:
                type: string
                example: "Testing"
              preheader:
                type: string
                example: "Preheader Testing"
              from_name:
                type: string
                example: "Test"
              from_email:
                type: string
                format: email
                example: "test@gmail.com"
              reply_to:
                type: string
                format: email
                example: "test@gmail.com"
              content_id:
                type: string
                example: "162"
              email_preview_link:
                type: boolean
                default: true
                example: true
              address:
                type: string
                example: "Canada"
              language:
                type: string
                example: "en"
              list_ids:
                type: array
                items:
                  type: string
                example:
                  - "15"
                  - "24"
              relational_table_ids:
                type: array
                items:
                  type: string
                example:
                  - "201"
                  - "153"
              segment_ids:
                type: array
                items:
                  type: string
                example:
                  - "5"
                  - "70"
              add_ctags:
                type: array
                items:
                  type: string
                example:
                  - "ctag_name1"
                  - "ctag_name2"
              status:
                type: string
                example: "test"
      default_schema:
        title: Default
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: "2023-01-10 Solo Newsletter: AquaTrue"
              subject:
                type: string
                example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
              preheader:
                type: string
                example: "Healthy Hydration = Better Health"
              from_name:
                type: string
                example: "Magellan Health"
              from_email:
                type: string
                format: email
                example: "health@magellan.com"
              reply_to:
                type: string
                format: email
                example: "health@magellan.com"
              content_id:
                type: string
                example: "43060"
              email_preview_link:
                type: boolean
                default: false
              address:
                type: string
                example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
              language:
                type: string
                description: |
                  Accepted values include the following:
                  * **en** - English
                  * **es** - Spanish
                  * **da** - Danish
                  * **de** - German
                  * **it** - Italian
                  * **fr** - French
                  * **nl** - Dutch
                  * **no** - Norwegian
                  * **pl** - Polish
                  * **pt** - Portuguese
                  * **sv** - Swedish
                  * **zh** - Chinese (Simplified)
                example: "en"
              list_ids:
                type: array
                items:
                  - type: integer
                    example: 15
                  - type: integer
                    example: 209
              relational_table_ids:
                type: array
                description: Each relational table included in this attribute must have a "Sendable" column defined. See [Creating Relational Tables](https://galaxy.maropost.com/s/article/Creating-Relational-Tables) for more information.
                default: null
                items:
                  - type: integer
                    example: 123
                  - type: integer
                    example: 2530
              suppressed_list_ids:
                type: array
                items:
                  - type: integer
                    example: 5
                  - type: integer
                    example: 70
              segment_ids:
                type: array
                items:
                  - type: integer
                    example: 5
                  - type: integer
                    example: 2333
              suppressed_segment_ids:
                type: array
                items:
                  - type: integer
                    example: 223
                  - type: integer
                    example: 920
              add_ctags:
                type: array
                items:
                  - type: string
                    example: "affiliate"
                  - type: string
                    example: "promotion"              
              status:
                type: string
                description: |
                  * **draft** - Create and save in draft mode
                  * **test** - Create and send as a test campaign
                  * **schedule** -- Create and send using the "Priority Send" option
                example: "schedule"
              send_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
      send_time_schema:
        title: Send Time Optimization
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: "2023-01-10 Solo Newsletter: AquaTrue"
              subject:
                type: string
                example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
              preheader:
                type: string
                example: "Healthy Hydration = Better Health"
              from_name:
                type: string
                example: "Magellan Health"
              from_email:
                type: string
                format: email
                example: "health@magellan.com"
              reply_to:
                type: string
                format: email
                example: "health@magellan.com"
              content_id:
                type: string
                example: "43060"
              email_preview_link:
                type: boolean
                default: false
              address:
                type: string
                example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
              language:
                type: string
                description: |
                  Accepted values include the following:
                  * **en** - English
                  * **es** - Spanish
                  * **da** - Danish
                  * **de** - German
                  * **it** - Italian
                  * **fr** - French
                  * **nl** - Dutch
                  * **no** - Norwegian
                  * **pl** - Polish
                  * **pt** - Portuguese
                  * **sv** - Swedish
                  * **zh** - Chinese (Simplified)
                example: "en"
              list_ids:
                type: array
                items:
                  - type: integer
                    example: 15
                  - type: integer
                    example: 209
              relational_table_ids:
                type: array
                description: Each relational table included in this attribute must have a "Sendable" column defined. See [Creating Relational Tables](https://galaxy.maropost.com/s/article/Creating-Relational-Tables) for more information.
                default: null
                items:
                  - type: integer
                    example: 123
                  - type: integer
                    example: 2530
              suppressed_list_ids:
                type: array
                items:
                  - type: integer
                    example: 5
                  - type: integer
                    example: 70
              segment_ids:
                type: array
                items:
                  - type: integer
                    example: 5
                  - type: integer
                    example: 2333
              suppressed_segment_ids:
                type: array
                items:
                  - type: integer
                    example: 223
                  - type: integer
                    example: 920
              add_ctags:
                type: array
                items:
                  - type: string
                    example: "affiliate"
                  - type: string
                    example: "promotion" 
              status:
                type: string
                example: "schedule"
              send_at:
                type: date-time
                description: The default send date and time for contacts with no prior campaign response history
                example: "2023-01-10T08:30:00.000-04:00"
              send_type:
                type: string
                description: |
                  Ref: [Creating Email Campaigns](https://galaxy.maropost.com/s/article/Creating-Email-Campaigns) for more information about the different send-time optimization features
                  * **one_time** -- Send according to where each contact is located based on time zone
                  * **best_time** -- Send according to when each contact most frequently reads their emails
                example: "best_time"
      recurring_schema:
        title: Recurring
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: "2023-01-10 Solo Newsletter: AquaTrue"
              subject:
                type: string
                example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
              preheader:
                type: string
                example: "Healthy Hydration = Better Health"
              from_name:
                type: string
                example: "Magellan Health"
              from_email:
                type: string
                format: email
                example: "health@magellan.com"
              reply_to:
                type: string
                format: email
                example: "health@magellan.com"
              content_id:
                type: string
                example: "43060"
              email_preview_link:
                type: boolean
                default: false
              address:
                type: string
                example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
              language:
                type: string
                description: |
                  Accepted values include the following:
                  * **en** - English
                  * **es** - Spanish
                  * **da** - Danish
                  * **de** - German
                  * **it** - Italian
                  * **fr** - French
                  * **nl** - Dutch
                  * **no** - Norwegian
                  * **pl** - Polish
                  * **pt** - Portuguese
                  * **sv** - Swedish
                  * **zh** - Chinese (Simplified)
                example: "en"
              list_ids:
                type: array
                items:
                  - type: integer
                    example: 15
                  - type: integer
                    example: 209
              relational_table_ids:
                type: array
                description: Each relational table included in this attribute must have a "Sendable" column defined. See [Creating Relational Tables](https://galaxy.maropost.com/s/article/Creating-Relational-Tables) for more information.
                default: null
                items:
                  - type: integer
                    example: 123
                  - type: integer
                    example: 2530
              suppressed_list_ids:
                type: array
                items:
                  - type: integer
                    example: 5
                  - type: integer
                    example: 70
              segment_ids:
                type: array
                items:
                  - type: integer
                    example: 5
                  - type: integer
                    example: 2333
              suppressed_segment_ids:
                type: array
                items:
                  - type: integer
                    example: 223
                  - type: integer
                    example: 920
              add_ctags:
                type: array
                items:
                  - type: string
                    example: "affiliate"
                  - type: string
                    example: "promotion"
              status:
                type: string
                description: Set this attribute to "recurring" and include both the **recurring** and **recurring_time** attributes in your input payload
                example: "recurring"
              recurring:
                type: object
                properties:
                  schedule:
                    type: string
                    description: |
                      * **day_of_week** - Send each week on specific days of the week
                      * **daily** - Send on a daily schedule
                      * **weekly** - Send each week on a specific day of the week
                      * **monthly** - Send each month on a specific day of the month 
                      * **yearly** - Send each year on the specific date
                    example: "daily"
                  days:
                    type: array
                    default: null
                    description: Include this integer array only when scheduling using **day_of_week**, where 0 = Sunday
                    items:
                      - type: integer
                      - type: integer
                  weekday:
                    type: integer
                    default: null
                    description: Include this attribute only when scheduling using **weekly**, where 0 = Sunday
                  day:
                    type: integer
                    default: null
                    description: Include this attribute only when scheduling using **monthly** or **yearly**
                  month:
                    type: integer
                    default: null
                    description: Include this attribute only when scheduling using **yearly**
              recurring_time:
                type: object
                properties:
                  hour:
                    type: string
                    description: Hour of the day in 24-hour format
                    example: "06"
                  minute:
                    type: string
                    example: "30"

      send_test_sms:
        title: Send Test
        type: object
        properties:
          sms_campaign:
            type: object
            properties:
              name:
                type: string
                example: "Spring Offer"
              message:
                type: string
                description: The message limit is 160 ASCII characters (including spaces).  If your message includes UCS-2 special characters, then the limit is reduced to 70 characters.
                example: "MAGELLAN: SURPRISE! Check your email for today's FLASH SALE. Use code N2AV2 Txt STOP to end, HELP for Help"
              phone_number:
                type: string
                description: The mobile number receiving this text message as a test
                example: "15558675309"
            required:
              - name 
              - message
              - phone_number
          sms_message:
            type: object
            properties:
              send_at:
                type: string
                example: once
          commit:
            type: string
            description: |
              Accepted values include the following:

              * **Send Test** - Create the SMS Campaign and send a test text message to the specified **phone_number**
            example: Send Test
        required:
          - sms_campaign
          - sms_message
          - commit

      schedule_sms:
        title: Default
        type: object
        properties:
          sms_campaign:
            type: object
            properties:
              name:
                type: string
                example: "Spring Offer"
              message:
                type: string
                example: "MAGELLAN:
                 SURPRISE! Check your email for today's FLASH SALE. Use code N2AV2.
                 Txt STOP to end, HELP for Help"
              from_number:
                type: string
                description: The toll-free number (or 10-Digit Long Code) assigned to your Marketing Cloud account
                example: "18881234567"
              send_at:
                type: date-time
                description: This attribute is required when you are scheduling the SMS Campaign to be sent at a specific date and time
                example: "2023-06-01T08:20:43"
            required:
              - name 
              - message
              - from_number
          contact tags:
            type: array
            items:
              type: string
              example: tag_name
          sms_lists:
            type: array
            items:
              - type: integer
                example: 67
              - type: integer
                example: 3
          sms_message:
            type: object
            properties:
              send_at:
                type: string
                example: once
          commit:
            type: string
            description: |
              Accepted values include the following:

              * **Schedule** - Create the SMS Campaign and schedule it to be sent on the date and time defined by the **send_at** attribute
              * **Send Now** - Create the SMS Campaign and immediately send it
              * **Save as Draft** -- Create the SMS Campaign and save it as draft
            example: Schedule
        required:
          - sms_campaign
          - sms_lists
          - sms_message
          - commit

      saved_as_draft:
        title: Saved as Draft
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: kap
              from_email:
                type: string
                format: email
                example: kapilchand@maropost.com
              reply_to:
                type: string
                format: email
                example: kapilchand@maropost.com
              brand_id:
                type: string
                example: "2"
              suppressed_list_ids:
                type: array
                items:
                  type: string
                  example: "66"
              suppressed_segment_ids:
                type: array
                items:
                  type: string
                  example: "34"
              suppressed_journey_ids:
                type: array
                items:
                  type: string
                  example: "21"
              address:
                type: string
                example: The Alternative Daily | 860 US Highway 1 | Suite 210 | North Palm Beach | FL | 33408
              language:
                type: string
                example: en
              email_preview_link:
                type: string
                example: "0"
              decided_by:
                type: string
                example: TopChoice
              campaign_groups_attributes:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Group A
                    content_id:
                      type: string
                      example: "92"
                    subject:
                      type: string
                      example: a
                    preheader:
                      type: string
                      example: "232"
                    from_name:
                      type: string
                      example: k
                    percentage:
                      type: string
                      example: "2"
                    send_at:
                      type: string
                      format: date-time
                      example: '2018-02-07 6:30:00'
              send_at:
                type: string
                format: date-time
                example: '2018-02-08 6:30:00'
              lists:
                type: array
                items:
                  type: string
                  example: "15"
              ctags:
                type: array
                items:
                  type: string
                  example: "5"
              segments:
                type: array
                items:
                  type: string
                  example: "5"
              commit:
                type: string
                example: Save as Draft
          
      send_test:
        title: Send Test
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: kap
              from_email:
                type: string
                format: email
                example: abc@maropost.com
              reply_to:
                type: string
                format: email
                example: abc@maropost.com
              brand_id:
                type: string
                example: "2"
              suppressed_list_ids:
                type: array
                items:
                  type: string
                  example: "66"
              suppressed_segment_ids:
                type: array
                items:
                  type: string
                  example: "34"
              suppressed_journey_ids:
                type: array
                items:
                  type: string
                  example: "21"
              address:
                type: string
                example: The Alternative Daily | 860 US Highway 1 | Suite 210 | North Palm Beach | FL | 33408
              language:
                type: string
                example: en
              email_preview_link:
                type: string
                example: "0"
              decided_by:
                type: string
                example: TopChoice
              campaign_groups_attributes:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Group A
                    content_id:
                      type: string
                      example: "92"
                    subject:
                      type: string
                      example: a
                    preheader:
                      type: string
                      example: "232"
                    from_name:
                      type: string
                      example: k
                    percentage:
                      type: string
                      example: "2"
                    send_at:
                      type: string
                      format: date-time
                      example: '2018-02-07 6:30:00'
              send_at:
                type: string
                format: date-time
                example: '2018-02-08 6:30:00'
              test_lists:
                type: array
                items:
                  type: string
                  example: "15"
              test_emails:
                type: array
                items:
                  type: string
                  format: email
                  example: "test@maropost.com,test2@maropost.com"

              ctags:
                type: array
                items:
                  type: string
                  example: "5"
              commit:
                type: string
                example: Send Test
      schedule:
        title: Schedule
        type: object
        properties:
          campaign:
            type: object
            properties:
              name:
                type: string
                example: kap
              from_email:
                type: string
                format: email
                example: kapilchand@maropost.com
              reply_to:
                type: string
                format: email
                example: kapilchand@maropost.com
              brand_id:
                type: string
                example: "2"
              suppressed_list_ids:
                type: array
                items:
                  type: string
                  example: "66"
              suppressed_segment_ids:
                type: array
                items:
                  type: string
                  example: "34"
              suppressed_journey_ids:
                type: array
                items:
                  type: string
                  example: "21"
              address:
                type: string
                example: The Alternative Daily | 860 US Highway 1 | Suite 210 | North Palm Beach | FL | 33408
              language:
                type: string
                example: en
              email_preview_link:
                type: string
                example: "0"
              decided_by:
                type: string
                example: TopChoice
              campaign_groups_attributes:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Group A
                    content_id:
                      type: string
                      example: "92"
                    subject:
                      type: string
                      example: a
                    preheader:
                      type: string
                      example: "232"
                    from_name:
                      type: string
                      example: k
                    percentage:
                      type: string
                      example: "2"
                    send_at:
                      type: string
                      format: date-time
                      example: '2018-02-07 6:30:00'
              send_at:
                type: string
                format: date-time
                example: '2018-02-08 6:30:00'
              lists:
                type: array
                items:
                  type: string
                  example: "15"
              ctags:
                type: array
                items:
                  type: string
                  example: "5"
              segments:
                type: array
                items:
                  type: string
                  example: "5"
              commit:
                type: string
                example: Schedule

      with_campaign_id:
        title: Default Schema
        type: object
        properties:
          email:
            type: object
            properties:
              campaign_id:
                type: integer
                example: 9268
              content_id:
                type: integer
                description: _(optional)_ Include this attribute **ONLY** if you want to override the one defined within the Campaign ID.
                example: 43060
              from_name:
                type: string
                description: _(optional)_ Include this attribute **ONLY** if you want to override the one defined within the Campaign ID.
                example: "Magellan Beach Cove Inn"
              from_email:
                type: string
                format: email
                description: _(optional)_ Include this attribute **ONLY** if you want to override the one defined within the Campaign ID.
                example: "reservations@magellan.com"
              reply_to:
                type: string
                format: email
                description: _(optional)_ Include this attribute **ONLY** if you want to override the one defined within the Campaign ID.
                example: "reservations@magellan.com"
              subject:
                type: string
                description: _(optional)_ Include this attribute **ONLY** if you want to override the one defined within the Campaign ID.
                example: "Reservation Confirmation"
              address:
                type: string
                description: _(optional)_ Include this attribute **ONLY** if you want to override the one defined within the Campaign ID.
                example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
              contact:
                type: object
                description: Recipient of the transactional email
                properties:
                  email:
                    type: string
                    format: email
                    example: johndoe@example.com
                  first_name:
                    type: string
                    example: John
                  last_name:
                    type: string
                    example: Doe
                  custom_field:
                    type: object
                    description: |
                      A list of the names of Email Contact custom fields and their values according to their data types

                      > **NOTE**: The names of the custom fields must already exist in your account before you can set their values for this Email Contact
                    properties:
                      isMember:
                        type: boolean
                        example: true 
                      membership_renewal_date:
                        type: date-time
                        example: "2023-05-22T01:48:37.094-04:00"
                      membership_level:
                        type: string
                        example: "Gold Membership"
                required:
                - email
              contact_id:
                type: integer
                description: _(optional)_ Substitute this attribute for the **contact** object if you just want to reference the recipient of the transactional email by its Marketing Cloud Contact ID
                example: 20498
              uid:
                type: string
                description: Must include this field if account has enabled **custom UID** option, for non-custom UID accounts it will be ignored, even if provided
                example: "ABC12345"
              bcc:
                type: string
                format: email
                description: _(optional)_
                example: "service@magellan.com"
              ignore_dnm:
                type: boolean
                description: If **true** then the recipient will receive this transactional email even if it is in the Do Not Mail list
                default: false
              send_time:
                type: object
                description: |
                  _(optional)_ Include this object if you want to delay sending the transactional email until the specified hour and minute (in Eastern Time Zone).
                  If the specified time has already passed according to the system time, then the transactional email will be sent the following day.
                properties:
                  hour:
                    type: string
                    example: "06"
                  minute:
                    type: string
                    example: "30"
              tags:
                type: object
                description: |
                  _(optional)_ Use this object for dynamic personalization within the body of your transactional email. The names of the attributes in this object correspond to the Liquid tags, {{tag._attribute_name_}} within the email content.
                properties:
                  confirmation_number:
                    type: integer
                    example: 41395793
                  arrival_date:
                    type: date-time
                    example: "01-Mar-2023"
                  departure_date:
                    type: date-time
                    example: "03-Mar-2023"
                  rate_part:
                    type: array
                    items:
                      - type: object
                        properties:
                          days_per_rate:
                            type: string
                            example: "01-Mar-2023"
                          rate:
                            type: float
                            example: 143.65
                      - type: object
                        properties:
                          days_per_rate:
                            type: string
                            example: "02-Mar-2023, 03-Mar-2023"
                          rate:
                            type: float
                            example: 199.99
              add_ctags:
                type: array
                description: |
                  A string array of Campaign Tags 

                  > **NOTE**: The Campaign Tags must already exist in your account before you can apply them here in this method
                items:
                  - type: string
                    example: "reminders"
                  - type: string
                    example: "email"
            required:
            - campaign_id
        required:
        - email
      with_content_body:
        title: Content Body Schema
        description: Use this schema if you are providing the entire content of the transactional email in this method call
        type: object
        properties:
          email:
            type: object
            properties:
              campaign_id:
                type: integer
                example: 9268
              content:
                type: object
                properties:
                  name:
                    type: string
                    description: the name of your email content
                    example: "Reservation Confirmation"
                  html_part:
                    type: string
                    description: HTML source of your email
                    example: "<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN' 'http://www.w3.org/TR/REC-html40/loose.dtd'><html><body>...</body></html>"
                  text_part:
                    type: string
                    description: The plain-text version of your email
                    example: "Your Reservation Confirmation"
              contact:
                type: object
                properties:
                  email:
                    type: string
                    format: email
                    example: johndoe@examp.com
                  first_name:
                    type: string
                    example: John
                  last_name:
                    type: string
                    example: Doe
                  custom_field:
                    type: object
                    description: |
                      A list of the names of Email Contact custom fields and their values according to their data types

                      > **NOTE**: The names of the custom fields must already exist in your account before you can set their values for this Email Contact
                    properties:
                      isMember:
                        type: boolean
                        example: true 
                      membership_renewal_date:
                        type: date-time
                        example: "2023-05-22T01:48:37.094-04:00"
                      membership_level:
                        type: string
                        example: "Gold Membership"
                required:
                - email
              uid:
                type: string
                description: Must include this field if account has enabled **custom UID** option, for non-custom UID accounts it will be ignored, even if provided
                example: "ABC12345"
              bcc:
                type: string
                format: email
                description: _(optional)_
                example: "service@magellan.com"
              ignore_dnm:
                type: boolean
                description: If **true** then the recipient will receive this transactional email even if it is in the Do Not Mail list
                default: false
              add_ctags:
                type: array
                description: |
                  A string array of Campaign Tags 

                  > **NOTE**: The Campaign Tags must already exist in your account before you can apply them here in this method
                items:
                  - type: string
                    example: "reminders"
                  - type: string
                    example: "email"
            required:
              - campaign_id
        required:
        - email
      create_push_message:
        title: Create push message
        type: object
        properties:
          push_message:
            type: object
            properties:
              send_to:
                type: object
                properties:
                  type:
                    type: string
                    example: "device_tokens"
                  ios_tokens:
                    type: string
                    example:  "378FBCD...55133394C, 123FBCD...551XXXY4C"
                  android_tokens:
                    type: string
                    example: ""
              name:
                type: string
                example:  "smiley test"
              message:
                type: string
                example: "Morning {{push_device.first_name}}, your news feed for today is ready ..."
              data:
                type: string
                example: "{\"user_email\":\"{{push_device.email}}\",\"acme2\":{\"acme\":\"backme\"}}"
              badge_count:
                type: integer
                example: 1
              sound:
                type: string
                example: default
              image_url:
                type: string
                format: url
                example: "https://cdn-m4m.chd01.com/logo/dev_image.jpeg"
              deep_linking_url:
                type: string
                format: url
                example: "myapp://host/destinationPage"
              title:
                type: string
                example: My title
              sub_title:
                type: string
                example: My Subtitle
              status:
                type: string
                example: "draft"

      in_app:
        title: In App
        type: object
        properties:
          push_message:
            type: object
            properties:
              send_to:
                type: object
                properties:
                  type:
                    type: string
                    example: "device_tokens"
                  ios_tokens:
                    type: string
                    example:  "378FBCD...55133394C, 123FBCD...551XXXY4C"
                  android_tokens:
                    type: string
                    example: ""
              name:
                type: string
                example:  "smiley test"
              message:
                type: string
                example: "Morning {{push_device.first_name}}, your news feed for today is ready ..."
              data:
                type: string
                example: "{\"user_email\":\"{{push_device.email}}\",\"acme2\":{\"acme\":\"backme\"}}"
              badge_count:
                type: integer
                example: 1
              sound:
                type: string
                example: default
              status:
                type: string
                example: "draft"
              send_type:
                type: string
                example: "2"
              in_app_options:
                type: object
                properties:
                  primary_color:
                    type: string
                    example: "#333333"
                  secondary_color:
                    type: string
                    example: "#eeeeee"
                  position:
                    type: string
                    example: '1'
                  duration:
                    type: string
                    example: '5'
                  expiry:
                    type: string
                    example: "1"
      recurring_daily:
        title: Recurring Daily
        type: object
        properties:
          push_message:
            type: object
            properties:
              send_to:
                type: object
                properties:
                  type:
                    type: string
                    example: "device_tokens"
                  ios_tokens:
                    type: string
                    example:  "378FBCD...55133394C, 123FBCD...551XXXY4C"
                  android_tokens:
                    type: string
                    example: ""
              name:
                type: string
                example:  "smiley test"
              message:
                type: string
                example: "Morning {{push_device.first_name}}, your news feed for today is ready ..."
              data:
                type: string
                example: "{\"user_email\":\"{{push_device.email}}\",\"acme2\":{\"acme\":\"backme\"}}"
              badge_count:
                type: integer
                example: 1
              sound:
                type: string
                example: default
              status:
                type: string
                example: "recurring"
              send_at:
                type: string
                example:  "March 31, 2016 01:10 AM"
              schedule_type:
                type: string
                example: "1"
              recurring_options:
                type: object
                properties:
                  schedule:
                    type: string
                    example: "daily"
                  hour:
                    type: string
                    example: "02"
                  minute:
                    type: string
                    example: "20"

      recurring_weekly:
        title: Recurring Weekly
        type: object
        properties:
          push_message:
            type: object
            properties:
              send_to:
                type: object
                properties:
                  type:
                    type: string
                    example: "device_tokens"
                  ios_tokens:
                    type: string
                    example:  "378FBCD...55133394C, 123FBCD...551XXXY4C"
                  android_tokens:
                    type: string
                    example: ""
              name:
                type: string
                example:  "smiley test"
              message:
                type: string
                example: "Morning {{push_device.first_name}}, your news feed for today is ready ..."
              data:
                type: string
                example: "{\"user_email\":\"{{push_device.email}}\",\"acme2\":{\"acme\":\"backme\"}}"
              badge_count:
                type: integer
                example: 1
              sound:
                type: string
                example: default
              status:
                type: string
                example: "recurring"
              send_at:
                type: string
                example:  "March 31, 2016 01:10 AM"
              schedule_type:
                type: string
                example: "1"
              recurring_options:
                type: object
                properties:
                  schedule:
                    type: string
                    example: "weekly"
                  weekday:
                    type: string
                    example: "4"
                  hour:
                    type: string
                    example: "02"
                  minute:
                    type: string
                    example: "20"
      recurring_monthly:
        title: Recurring Monthly
        type: object
        properties:
          push_message:
            type: object
            properties:
              send_to:
                type: object
                properties:
                  type:
                    type: string
                    example: "device_tokens"
                  ios_tokens:
                    type: string
                    example:  "378FBCD...55133394C, 123FBCD...551XXXY4C"
                  android_tokens:
                    type: string
                    example: ""
              name:
                type: string
                example:  "smiley test"
              message:
                type: string
                example: "Morning {{push_device.first_name}}, your news feed for today is ready ..."
              data:
                type: string
                example: "{\"user_email\":\"{{push_device.email}}\",\"acme2\":{\"acme\":\"backme\"}}"
              badge_count:
                type: integer
                example: 1
              sound:
                type: string
                example: default
              status:
                type: string
                example: "recurring"
              send_at:
                type: string
                example:  "March 31, 2016 01:10 AM"
              schedule_type:
                type: string
                example: "1"
              recurring_options:
                type: object
                properties:
                  schedule:
                    type: string
                    example: "monthly"
                  day:
                    type: string
                    example: "4"
                  hour:
                    type: string
                    example: "02"
                  minute:
                    type: string
                    example: "20"
      recurring_yearly:
        title: Recurring Yearly
        type: object
        properties:
          push_message:
            type: object
            properties:
              send_to:
                type: object
                properties:
                  type:
                    type: string
                    example: "device_tokens"
                  ios_tokens:
                    type: string
                    example:  "378FBCD...55133394C, 123FBCD...551XXXY4C"
                  android_tokens:
                    type: string
                    example: ""
              name:
                type: string
                example:  "smiley test"
              message:
                type: string
                example: "Morning {{push_device.first_name}}, your news feed for today is ready ..."
              data:
                type: string
                example: "{\"user_email\":\"{{push_device.email}}\",\"acme2\":{\"acme\":\"backme\"}}"
              badge_count:
                type: integer
                example: 1
              sound:
                type: string
                example: default
              status:
                type: string
                example: "recurring"
              send_at:
                type: string
                example:  "March 31, 2016 01:10 AM"
              schedule_type:
                type: string
                example: "1"
              recurring_options:
                type: object
                properties:
                  schedule:
                    type: string
                    example: "yearly"
                  day:
                    type: string
                    example: "4"
                  month:
                    type: string
                    example: "10"
                  hour:
                    type: string
                    example: "02"
                  minute:
                    type: string
                    example: "20"
      push_device_sc:
        type: object
        properties:
          push_device:
            type: object
            properties:
              token:
                type: string
                example: 378FBCD...55133394C
              email:
                type: string
                format: email
                example: johndoe@example.com
              latitude:
                type: number
                format: float
                example: 30.707
              longitude:
                type: number
                format: float
                example: 76.8604
              time_zone_offset:
                type: number
                format: float
                example: 5.5
              device_tags:
                type: string
                example: double||pipe||appended||keywords||
              platform:
                type: integer
                example: 1
              status:
                type: integer
                example: 1
              language:
                type: string
                example: en
              login_id:
                type: string
                example: "3249"
              form_factor:
                type: integer
                example: 1
              os_version:
                type: string
                example: "9.1.2"
              first_name:
                type: string
                example: John
              last_name:
                type: string
                example: Appleseed
      added_to_cart:
        title: Added to cart
        type: object
        properties:
          event_name:
            type: string
            example: added_to_cart
          cart_id:
            type: string
            example: "1"
          sku:
            type: string
            example: green shirt
          description:
            type: string
            example: best quantity in the market
          quantity:
            type: string
            example: "1"
          product_category:
            type: string
            example: mens shirt
          brand:
            type: string
            example: your branch name
          model_number:
            type: string
            example: ERd3422
          value:
            type: string
            example: "2000.00"
          campaign_id:
            type: string
            example: "213"
          latitude:
            type: string
            example: "1990100"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
          session_id:
            type: string
            example: "12"
          platform:
            type: string
            example: "1"
      removed_from_cart:
        title: Removed from cart
        type: object
        properties:
          event_name:
            type: string
            example: Removed_from_cart
          cart_id:
            type: string
            example: "1"
          sku:
            type: string
            example: green shirt
          description:
            type: string
            example: best quantity in the market
          quantity:
            type: string
            example: "1"
          product_category:
            type: string
            example: mens shirt
          brand:
            type: string
            example: your branch name
          model_number:
            type: string
            example: ERd3422
          value:
            type: string
            example: "2000.00"
          campaign_id:
            type: string
            example: "213"
          latitude:
            type: string
            example: "1990100"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
          session_id:
            type: string
            example: "12"
          platform:
            type: string
            example: "1"
      started_checkout:
        title: Started Checkout
        type: object
        properties:
          event_name:
            type: string
            example: Started_Checkout
          cart_id:
            type: string
            example: "1"
          value:
            type: string
            example: "2000.00"
          campaign_id:
            type: string
            example: "213"
          latitude:
            type: string
            example: "1990100"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
          session_id:
            type: string
            example: "12"
          platform:
            type: string
            example: "1"
      finished_checkout:
        title: Completed Checkout
        type: object
        properties:
          event_name:
            type: string
            example: Completed checkout
          order_id:
            type: string
            example: "1"
          order_date:
            type: string
            format: date-time
            example: '2018-10-30 06:33:17 +05:30'
          order_status:
            type: string
            example: Completed
          value:
            type: string
            example: "300.00"
          coupon_code:
            type: string
            example: ERX50WV
          session_id:
            type: string
            example: "13"
          platform:
            type: string
            example: "1"
          campaign_id:
            type: string
            example: "23"
          latitude:
            type: string
            example: "1990100"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
      started_content:
        title: Started Content
        type: object
        properties:
          event_name:
            type: string
            example: Started_Content
          content_id:
            type: string
            example: "1"
          title:
            type: string
            example: game start now
          description:
            type: string
            example: Best player
          category:
            type: string
            example: IER
          value:
            type: string
            example: "1099.99"
          campaign_id:
            type: string
            example: "213"
          latitude:
            type: string
            example: "1990100.0"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
          session_id:
            type: string
            example: "12"
          platform:
            type: string
            example: "1"
      finished_content:
        title: Finished Content
        type: object
        properties:
          event_name:
            type: string
            example: Finished_Content
          content_id:
            type: string
            example: "1"
          title:
            type: string
            example: game finished
          description:
            type: string
            example: Player won
          category:
            type: string
            example: Game
          value:
            type: string
            example: "1099.99"
          campaign_id:
            type: string
            example: "213"
          latitude:
            type: string
            example: "1990100.00"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
          session_id:
            type: string
            example: "12"
          platform:
            type: string
            example: "1"
      custom_event:
        title: Custom Event
        type: object
        properties:
          event_name:
            type: string
            example: product info
          content_id:
            type: string
            example: "1"
          title:
            type: string
            example: Gemy
          description:
            type: string
            example: Best product in the market
          category:
            type: string
            example: ecommerce
          value:
            type: string
            example: "2000.00"
          order_id:
            type: string
            example: "25"
          phone_number:
            type: string
            example: "+9109299992"
          company_name:
            type: string
            example: brand value
          campaign_id:
            type: string
            example: "213"
          latitude:
            type: string
            example: "1990100.00"
          longitude:
            type: string
            example: "1000.99"
          push_device_id:
            type: string
            example: "1"
          session_id:
            type: string
            example: "12"
          platform:
            type: string
            example: "1"
      opens_schema:
        type: array
        items:
          type: object
          properties:
            account_id:
              type: integer
              example: 11370
            campaign_id:
              type: integer
              example: 18812
            contact_id:
              type: integer
              example: 7141625
            uid:
              type: string
              example: AB13EZ
            browser:
              type: string
              example: "Chrome | Mac | Unknown | desktop"
            recorded_at:
              type: date-time
              example: '2023-06-05T08:32:23.957-04:00'
            campaign_tags:
              type: array
              description: A string array of Campaign Tags
              items:
                - type: string
                  example: "offers"
                - type: string
                  example: "affiliate"
            contact:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: johndoe@example.com
                membership_level:
                  type: string
                  example: "Gold Membership"
                membership_renewal_date:
                  type: date-time
                  example: '2023-06-05T08:32:23.957-04:00'
                first_name:
                  type: string
                  example: "John"
                last_name:
                  type: string
                  example: "Doe"
                phone:
                  type: string
                  example: "+918987600005"
            total_pages:
              type: integer
              example: 409
      clicks_schema:
        type: array
        items:
          type: object
          properties:
            account_id:
              type: integer
              example: 11370
            campaign_id:
              type: integer
              example: 18812
            contact_id:
              type: integer
              example: 7141625
            uid:
              type: string
              example: AB13EZ
            browser:
              type: string
              example: "Chrome | Mac | Unknown | desktop"
            url:
              type: string
              format: url
              example: "https://shop.examples.com/summer_wear/"
            content_url_id:
              type: integer
              example: 60783
            ip_address:
              type: string
              example: "11.222.333.123"
            recorded_at:
              type: date-time
              example: '2023-06-05T08:32:23.957-04:00'
            campaign_tags:
              type: array
              description: A string array of Campaign Tags
              items:
                - type: string
                  example: "offers"
                - type: string
                  example: "affiliate"
            contact:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: johndoe@example.com
                membership_level:
                  type: string
                  example: "Gold Membership"
                membership_renewal_date:
                  type: date-time
                  example: '2023-06-05T08:32:23.957-04:00'
                first_name:
                  type: string
                  example: "John"
                last_name:
                  type: string
                  example: "Doe"
                phone:
                  type: string
                  example: "+918987600005"
            total_pages:
              type: integer
              example: 409
      bounces_schema:
        type: array
        items:
          type: object
          properties:
            type:
              type: string
              example: Hard
            account_id:
              type: integer
              example: 11370
            campaign_id:
              type: integer
              example: 18812
            contact_id:
              type: integer
              example: 7141625
            uid:
              type: string
              example: AB13EZ
            error:
              type: string
              example: "5.4.1"
            diagnostic:
              type: string
              example: "550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [YT3CAN01FT011.eop-CAN01.prod.protection.outlook.com 2023-06-05T08:32:23.957Z 08DB80F75B69EE6F]"
            recorded_on:
              type: date-time
              example: '2023-06-05T08:32:23.957-04:00'
            campaign_tags:
              type: array
              description: A string array of Campaign Tags
              items:
                - type: string
                  example: "offers"
                - type: string
                  example: "affiliate"
            contact:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: johndoe@example.com
                membership_level:
                  type: string
                  example: "Gold Membership"
                membership_renewal_date:
                  type: date-time
                  example: '2023-06-05T08:32:23.957-04:00'
                first_name:
                  type: string
                  example: "John"
                last_name:
                  type: string
                  example: "Doe"
                phone:
                  type: string
                  example: "+918987600005"
            total_pages:
              type: integer
              example: 409
      unsubscribes_schema:
        type: array
        items:
          type: object
          properties:
            account_id:
              type: integer
              example: 11370
            list_id:
              type: integer
              description: The email list that this contact was subscribed to at the time they unsubscribed
              example: 16
            campaign_id:
              type: integer
              example: 18812
            contact_id:
              type: integer
              example: 7141625
            uid:
              type: string
              example: AB13EZ
            recorded_on:
              type: date-time
              example: '2023-06-05T08:32:23.957-04:00'
            campaign_tags:
              type: array
              description: A string array of Campaign Tags
              items:
                - type: string
                  example: "offers"
                - type: string
                  example: "affiliate"
            contact:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: johndoe@example.com
                membership_level:
                  type: string
                  example: "Gold Membership"
                membership_renewal_date:
                  type: date-time
                  example: '2023-06-05T08:32:23.957-04:00'
                first_name:
                  type: string
                  example: "John"
                last_name:
                  type: string
                  example: "Doe"
                phone:
                  type: string
                  example: "+918987600005"
            total_pages:
              type: integer
              example: 409
      complaints_schema:
        type: array
        items:
          type: object
          properties:
            account_id:
              type: integer
              example: 11370
            campaign_id:
              type: integer
              example: 18812
            contact_id:
              type: integer
              example: 7141625
            uid:
              type: string
              example: AB13EZ
            recorded_on:
              type: date-time
              example: '2023-06-05T08:32:23.957-04:00'
            campaign_tags:
              type: array
              description: A string array of Campaign Tags
              items:
                - type: string
                  example: "offers"
                - type: string
                  example: "affiliate"
            contact:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  example: johndoe@example.com
                membership_level:
                  type: string
                  example: "Gold Membership"
                membership_renewal_date:
                  type: date-time
                  example: '2023-06-05T08:32:23.957-04:00'
                first_name:
                  type: string
                  example: "John"
                last_name:
                  type: string
                  example: "Doe"
                phone:
                  type: string
                  example: "+918987600005"
            total_pages:
              type: integer
              example: 409
      ab_reports_schema:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 9865
            name:
              type: string
              example: "2023-01-15 Solo Newsletter: AquaTrue"
            account_id:
              type: integer
              example: 11370
            content_id:
              type: integer
              description: The Content ID used by the final email sent to the remaining audience of the AB Campaign
              example: 180
            content_history_id:
              type: integer
              example: 819
            from_email:
              type: email
              example: health@magellan.com
            subject:
              type: string
              description: The subject line used by the final email sent to the remaining audience of the AB Campaign
              example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
            reply_to:
              type: email
              exmaple: promotions@magellan.com
            from_name:
              type: string
              example: Magellan Health
            preheader:
              type: string
              example: "Healthy Hydration = Better Health"
            send_at:
              type: date-time
              description: The date-time when the final sets of emails are scheduled to be sent after determining the winning criteria
              example: '2023-01-10T08:30:00.000-04:00'
            sent_at:
              type: string
              format: date-time
              example: '2023-01-10T08:30:00.000-04:00'
            status:
              type: string
              example: sent
            test_campaign:
              type: boolean
              example: false
            language:
              type: string
              example: en
            address:
              type: string
              example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
            contacts_count:
              type: integer
              description: The total number of contacts from the AB Campaign's targeted audience that were calculated to receive the final set of emails
              example: 253016
            recurring:
              description: _Not used for AB Campaigns_
              default: null
            recurring_time:
              description: _Not used for AB Campaigns_
              default: null
            parent_id:
              description: _Not used for AB Campaigns_
              default: null
            version_number:
              description: _Not used for AB Campaigns_
              default: null
            campaign_type:
              type: integer
              description: Will always be **3** indicating that this email campaign is an AB Campaign
              default: 3
            decided_by:
              type: string
              example: opens
            winner_campaign_id:
              type: integer
              description: The Campaign ID of the winning test group
              example: 861
            campaign_group_id:
              description: _Not used for AB Campaigns_
              default: null
            suppress_workflow:
              description: _Not used for AB Campaigns_
              default: null
            email_preview_link:
              type: boolean
              example: true
            send_optimization:
              description: _Not used for AB Campaigns_
              default: null  
            workflow_item_id:
              description: _Not used for AB Campaigns_
              default: null
            one_time:
              description: _Not used for AB Campaigns_
              default: null
            folder_id:
              type: integer
              example: 36
            crm_name:
              description: _Not used for AB Campaigns_
              default: null
            brand_id:
              type: integer
              example: 22
            crm_campaign_id:
              description: _Not used for AB Campaigns_
              default: null
            created_at:
              type: date-time
              example: '2023-01-08T07:06:47.000-04:00'
            updated_at:
              type: date-time
              example: '2023-01-10T08:30:00.000-04:00'
            total_pages:
              type: integer
              example: 1
            send_total:
              type: integer
              description: The total number of contacts from the AB Campaign's targeted audience that actually receivee the final set of emails
              example: 253012
            received_total:
              type: integer
              example: 250393
            open_total:
              type: integer
              example: 54451
            click_total:
              type: integer
              example: 1818
            unique_bounces:
              type: integer
              example: 2619
            unique_unsubscribes:
              type: integer
              example: 90
            ab_campaigns:
              type: array
              items:
                - type: object
                  properties:
                    id:
                      type: integer
                      example: 861
                    name:
                      type: string
                      example: "2023-01-15 Solo Newsletter: AquaTrue - Group1"
                    send_at:
                      type: date-time
                      example: '2023-01-10T06:00:00.000-04:00'
                    contacts_count:
                      type: integer
                      example: 31628
                    send_total:
                      type: integer
                      example: 31628
                    received_total:
                      type: integer
                      example: 31418
                    open_total:
                      type: integer
                      example: 7738
                    click_total:
                      type: integer
                      example: 253
                    unique_bounces:
                      type: integer
                      example: 210
                    unique_unsubscribes:
                      type: integer
                      example: 10
                - type: object
                  properties:
                    id:
                      type: integer
                      example: 862
                    name:
                      type: string
                      example: "2023-01-15 Solo Newsletter: AquaTrue - Group2"
                    send_at:
                      type: date-time
                      example: '2023-01-10T06:00:00.000-04:00'
                    contacts_count:
                      type: integer
                      example: 31628
                    send_total:
                      type: integer
                      example: 31628
                    received_total:
                      type: integer
                      example: 31428
                    open_total:
                      type: integer
                      example: 7858
                    click_total:
                      type: integer
                      example: 336
                    unique_bounces:
                      type: integer
                      example: 200
                    unique_unsubscribes:
                      type: integer
                      example: 11

      custom_reports_schema:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 6092
            account_id:
              type: integer
              example: 4
            name:
              type: string
              example: Custom Report 1
            from:
              type: string
              format: date
              example: '2014-01-01'
            upto:
              type: string
              format: date
              example: '2014-01-01'
            data:
              type: object
              properties:
                send_total:
                  type: integer
                  example: 158
                delivered_total:
                  type: integer
                  example: 88
                open_total:
                  type: integer
                  example: 88
                open_uniques:
                  type: integer
                  example: 34
                click_total:
                  type: integer
                  example: 1
                click_uniques:
                  type: integer
                  example: 1
                total_bounces:
                  type: integer
                  example: 1
                soft_bounces:
                  type: integer
                  example: 1
                hard_bounces:
                  type: integer
                  example: 1
                complaints:
                  type: integer
                  example: null
                unsubscribe_total:
                  type: integer
                  example: 24
                combined_product_revenue_details:
                  type: object
                  properties:
                    total_revenue:
                      type: integer
                      example: 12
                    total_orders:
                      type: integer
                      example: 8
                    total_items_purchased:
                      type: integer
                      example: 8
                    total_uniq_items_purchased:
                      type: integer
                      example: 5
                    conversion_rate:
                      type: integer
                      example: 12
                    average_order_value:
                      type: integer
                      example: 9
                detail_data:
                  type: array
                  items:
                    type: object
                    properties:
                      campaign_id:
                        type: integer
                        example: 2067
                      campaign_name:
                        type: string
                        example: "testcamp"
                      campaign_type:
                        type: string
                        example: "Recurring"
                      campaign_send_date:
                        type: string
                        format: date
                        example: '02/01/2025 00:11:09'
                      total_contacts:
                        type: integer
                        example: 0
                      from_email:
                        type: string
                        example: "JohnDoe@example.com"
                      subject:
                        type: string
                        example: "Test"
                      total_emails_sent:
                        type: integer
                        example: 8
                      emails_delivered:
                        type: integer
                        example: 8
                      delivered_percentage:
                        type: string
                        example: "100%"
            report_type:
              type: string
              example: campaign
            schedule_type:
              type: integer
              example: 1
            rule_match_option:
              type: integer
              example: 1
            email_option:
              type: boolean
              example: false
            send_to_email:
              type: string
              example: ""
            send_to_subject:
              type: string
              example: ""
            send_to_comments:
              type: string
              example: ""
            run_at_option:
              type: integer
              default: null
            email_file_type:
              type: integer
              example: 1
            run_at_option_value:
              type: integer
              default: null
            run_at_time:
              type: integer
              default: null
            enabled:
              type: boolean
              example: true
            day_wise:
              type: boolean
              example: false
            brand_id:
              type: integer
              default: null
            created_at:
              type: string
              format: date-time
              example: '2023-06-05T08:32:23.977-04:00'
            updated_at:
              type: string
              format: date-time
              example: '2023-06-05T08:32:23.974-04:00'
            select_options:
              type: array
              items:
                - type: string
                  example: "all"
            selected_fields:
              type: array
            runtime:
              type: string
              format: date-time
              example: '2023-06-05T08:32:23.977-04:00'
            time_format:
              type: integer
              example: 1
            isp_fields:
              type: integer
              default: null
            criteria:
              type: object
              properties:
                ctags:
                  type: string
                  example: "or"
                select_all_campaign_ids:
                  type: boolean
                  example: false
            total_pages:
              type: integer
              example: 1
            lists:
              type: array
            campaigns:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                    example: 88870
                  name:
                    type: string
                    example: Campaign 1
      open_reports_schema:
        type: array
        items:
          type: object
          properties:
            account_id:
              type: integer
              example: 11370
            campaign_id:
              type: integer
              example: 885
            contact_id:
              type: integer
              example: 714625
            email:
              type: string
              format: email
              example: "johndoe@example.com"
            browser:
              type: string
              example: "Chrome | Mac | Unknown | desktop"
            open_count:
              type: integer
              example: 1
            recorded_at:
              type: date-time
              example: "2023-06-01T03:20:43.115-04:00"
            total_pages:
              type: integer
              example: 237
            uid:
              type: string
              example: "AB13EZ"
            campaign_tags:
              type: array
              items:
                - type: string
                  example: "affilate"
                - type: string
                  example: "promotions"
      click_reports_schema:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              default: null
            account_id:
              type: integer
              example: 11370
            campaign_id:
              type: integer
              example: 885
            contact_id:
              type: integer
              example: 714625
            email:
              type: string
              format: email
              example: "johndoe@example.com"
            url:
              type: string
              example: "https://shop.example.com/summer_wear/"
              format: url
            browser:
              type: string
              example: "Chrome | Mac | Unknown | desktop"
            content_url_id:
              type: integer
              example: 144
            ip_address:
              type: string
              example: "11.222.333.123"
            recorded_at:
              type: date-time
              example: "2023-06-01T03:20:43.117-04:00"
            total_pages:
              type: integer
              example: 14
            uid:
              type: string
              example: "AB13EZ"
            campaign_tags:
              type: array
              items:
                - type: string
                  example: "affilate"
                - type: string
                  example: "promotions"

      link_reports_schema:
        type: array
        items:
          type: object
          properties:
            campaign_id:
              type: integer
              example: 885
            content_url_id:
              type: integer
              example: 798
            url:
              type: string
              example: "https://shop.example.com/summer_wear/"
              format: url
            count_all:
              type: integer
              description: The total number of clicks on this link
              example: 579
            total_pages:
              type: integer
              example: 1
      tags_schema:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 30
            name:
              type: string
              example: male
            account_id:
              type: integer
              example: 1
            contacts:
              type: integer
              example: 20
            created_at:
              type: string
              format: date-time
              example: '2023-05-24T23:59:15.325-04:00'
            updated_at:
              type: string
              format: date-time
              example: '2023-05-24T23:59:15.325-04:00'
      lists_schema:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              example: 8440
            account_id:
              type: integer
              example: 11370
            name:
              type: string
              example: "ClickBank Offer Buyers"
            address:
              type: string
              example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
            language:
              type: string
              example: en
            from_name:
              type: string
              description: The default "friendly from name" of the email campaign using this List
              example: "Magellan Health"
            from_email:
              type: string
              format: email
              description: The default from address of the email campaign using this List
              example: health@e.magellan.com
            reply_to_email:
              type: string
              format: email
              description: |
                The default "reply-to address" of the email campaign using this List

                > **NOTE**: This address is not the return-path email address that is used for SPF validation.
              example: health@e.magellan.com
            add_to_unsubscribe_page:
              type: boolean
              description: Defines if this List appears in the hosted Manage Subscriptions page
              default: false
            refreshed_at:
              type: date-time
              example: '2023-06-05T08:32:24.045-04:00'
            subscribers:
              type: integer
              example: 201209
            unsubscribes:
              type: integer
              example: 4908
            soft_bounces:
              type: integer
              example: 15093
            hard_bounces:
              type: integer
              example: 107
            post_url:
              type: string
              format: url
              description: The external API endpoint that receives the webhook callback whenever there is a change to a contact's status in this List.
              example: "https://callback.example.com/d6af-4cc8-aa7b-ce246f9e9c4c"
            list_type:
              type: string
              description: |
                * **normal** means this List can be used for either targeting or suppression
                * **suppressed** means this List can be used only for suppression
              example: "normal"
            folder_id:
              type: integer
              example: 4
            brand_id:
              type: integer
              description: Indicates which Brand this List is associated with
              example: 134
            crm_entity_id:
              type: integer
              example: 42
            created_at:
              type: date-time
              example: '2023-06-05T08:32:24.045-04:00'
            updated_at:
              type: date-time
              example: '2023-06-05T08:32:24.045-04:00'
            display_name:
              type: string
              description: The "friendly name" how this List will appear on the hosted Manage Subscriptions page
              example: "ClickBank Offers"
            description:
              type: string
              description: Additional information about this List when displayed on the hosted Manage Subscriptions page
              example: "Newsletters sent to customers who purchased a ClickBank offer"
            total_revenue:
              type: float
              example: 1230890.43
            archived:
              type: boolean
              example: false
            complaints_count:
              type: integer
              example: 10
            status:
              type: string
              description: |
                * **active** means this list is available for segmentation and for targeting
                * **archived** means this list is archived and will not appear anywhere in the application except in the **Archives**
              example: active
            total_contacts_count:
              type: integer
              example: 221327
            total_pages:
              type: integer
              example: 12
            sms_subscribers:
              type: integer
              example: 1
            sms_unsubscribers:
              type: integer
              example: 0

      contacts(GraphQL):
        type: object
        properties:
          "query Contacts":
            type: object
            properties:
              account_id:
                type: number
                format: integer
                example: 11370
              id:
                type: number
                format: integer
                example: 42817337
              uid:
                type: string
                example: "AB13EZ"
              email:
                type: string
                example: "johndoe@example.com"
              first_name:
                type: string
                example: John
              last_name:
                type: string
                example: Doe
              total_revenue:
                type: float
                example: 199.07
              custom_field_string:
                type: string
                example: "Gold Membership"
              custom_field_boolean:
                type: boolean
                example: false
              custom_field_datetime:
                type: boolean
                example: "2023-05-22T01:48:37.094-04:00"
              custom_field_integer:
                type: integer
                example: 500
              custom_field_float:
                type: float
                example: 147.32
              custom_field_text:
                type: text
                example: "large text_part"
              created_at:
                type: date-time
                example: "2023-05-22T01:48:37.094-04:00"
              updated_at:
                type: date-time
                example: "2023-05-22T01:48:37.094-04:00"
              total_pages:
                type: number
                format: integer
                example: 20
              sends:
                type: object
                description: |
                  The **sends** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns sent within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns sent within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent send event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  created_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              opens:
                type: object
                description: |
                  The **opens** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns opened within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns opened within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent open event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  browser:
                    type: string
                    example: "Chrome | Mac | Unknown | desktop"
                  ip_address:
                    type: string
                    example: "11.222.333.123"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              clicks:
                type: object
                description: |
                  The **clicks** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns clicked within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns clicked within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent click event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  browser:
                    type: string
                    example: "Chrome | Mac | Unknown | desktop"
                  ip_address:
                    type: string
                    example: "11.222.333.123"
                  url:
                    type: string
                    format: url
                    example: "https://shop.examples.com/summer_wear/"
                  content_url_id:
                    type: integer
                    example: 60783
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              bounces:
                type: object
                description: |
                  The **bounces** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent bounce event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  blocked:
                    type: string
                    description: | 
                      Indicates whether this contact will be blocked from receiving future emails.
                      * **"false"** - Not blocked; will continue to receive emails.
                      * **"true"** - Blocked from receiving emails (e.g. due to hard bounce).
                  diagnostic:
                    type: string
                    example: "550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [YT3CAN01FT011.eop-CAN01.prod.protection.outlook.com 2023-06-05T08:32:23.957Z 08DB80F75B69EE6F]"
                  error:
                    type: string
                    example: "5.4.1"
                  hard_bounce:
                    type: boolean
                    example: true
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  type:
                    type: string
                    description: |
                      * **soft** - indicates a temporary rejection
                      * **hard** - indicates a permanent rejection
                    example: "hard"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_on:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              complaints:
                type: object
                description: |
                  The **complaints** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns that received a spam complaint within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns that received a spam complaint within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent complaint event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  id:
                    type: integer
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  esp:
                    type: string
                    description: the mailbox provider that recorded the spam complaint
                    example: "aol"  
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  created_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              journeys:
                type: object
                description: |
                  The **journeys** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: integer
                    example: 11370
                  id:
                    type: integer
                    description: the Journey ID that the contact is currently flowing through or has completed.
                    example: 709
                  name:
                    type: string
                    example: "Sugar Buster Lead Conversion and Upsell Journey"
                  journey_status:
                    type: string
                    example: "active"                      
                  journey_contact_status:
                    type: string
                    example: "active"
                  created_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  updated_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
              list_subscriptions:
                type: object
                description: |
                  The **journeys** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties: 
                  list_id:
                    type: integer
                    example: 17
                  name:
                    type: string
                    example: "Goldstar Members"
                  status:
                    type: string
                    example: "Subscribed"
                  created_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  updated_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
              orders:
                type: object
                description: |
                  The **orders** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    type: integer
                    description: the ID of the Order record in Marketing Cloud
                    example: 33
                  original_order_id:
                    type: string
                    description: the ID of the Order originally assigned by the commerce system
                  order_status:
                    type: string
                    example: "SALE"
                  order_date:
                    type: date-time
                    description: the timestamp of when the original order was created in the commerce system
                    example: "2023-06-01T13:07:25.445-04:00"
                  products_purchased:
                    type: string
                    description: A comma-separated string of Marketing Cloud-assigned product IDs purchased in the Order.
                    example: "71579901, 71579902, 71579910"
                  grand_total:
                    type: integer
                    description: The grand_total is stored as a float but returned in this schema truncated to the nearest integer.
                    example: 137
                  created_at:
                    type: date-time
                    description: the timestamp of when the Order record was created in Marketing Cloud
                    example: "2023-06-01T13:07:25.445-04:00"
                  updated_at:
                    type: date-time
                    description: the timestamp of when the Order record was last updated in Marketing Cloud
                    example: "2023-06-01T13:07:25.445-04:00"
              tags:
                type: object
                description: |
                  The **tags** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  name:
                    type: string
                    example: "replenishment needed"
                  created_at:
                    type: date-time
                    example: "2023-06-01T13:07:25.445-04:00"

      campaigns(GraphQL):
        type: object
        properties:
          "query Campaigns":
            type: object
            properties:
              id:
                type: number
                format: integer
                example: 100880
              name:
                type: string
                example: "2023-01-10 Solo Newsletter: AquaTrue"
              account_id:
                type: integer
                example: 11370
              content_id:
                type: integer
                example: 43060
              content_history_id:
                type: integer
                example: 30822
              from_email:
                type: string
                example: "health@magellan.com"
              subject:
                type: string
                example: "Unlock Healthier Hydration: Pure Water for Pure Wellness"
              reply_to:
                type: string
                example: "health@magellan.com"
              from_name:
                type: string
                example: "Magellan Health"
              language:
                type: string
                example: "en"
              address:
                type: string
                example: "180 University Ave., Suite 5002, Toronto, ON, Canada M5H 0A2"
              email_preview_link:
                type: string
                example: "true"
              crm_name:
                type: boolean
              brand_id:
                type: integer
                example: 32
              send_optimization:
                type: boolean
                example: true
              one_time:
                type: string
                description: Indicates whether this campaign was sent using the "Time Zone Optimization" option.
                example: false                
              send_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
              sent_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
              status:
                type: string
                example: "sent"
              test_campaign:
                type: string
                example: false                
              contacts_count:
                type: integer
                example: 17286
              parent_id:
                type: integer
                description: |
                  Depending upon the type of campaign, this attribute has a different meaning.
                  * If the campaign was a test campaign, then parent_id is the ID of the original campaign that the test campaign was sent from.
                  * If the campaign was a recurring campaign, then parent_id is the ID of the parent campaign that displays the grand total counts of the delivery and response metrics of each individual day's sends.
                example: null
              campaign_type:
                type: string
                description: |
                  * **1** - Bulk-send Campaign or Transactional Campaign
                  * **3** - AB Campaign
                  * **4** - Journey Campaign
                example: "1"
              decided_by:
                type: string
                description: |
                  Included only for AB Campaigns. Indicates the winning criteria specified for the AB Test.

                  Values include the following:
                  * **TopChoice** - The campaign sent to the final audience combines the subject line and from name from the test group having the highest open rate together with the content from the test group having the highest click rate.
                  * **Opens** - The campaign sent to the final audience is from the text group having the highest open rate.
                  * **Clicks** - The campaign sent to the final audience is from the text group having the highest click rate.
                  * **click-to-open** - The campaign sent to the final audience is from the text group having the highest click-to-open rate.
                  * **conversions** - The campaign sent to the final audience is from the text group having the highest conversion rate (requires that you account be enabled for Product/Revenue).
                example: null
              winner_campaign_id:
                type: integer
                description: |
                  Included only for AB Campaigns. Indicates the winning test group's Campaign ID according to the specified **decided_by** criteria.
                example: null
              campaign_group_id:
                type: integer
                example: null
              total_sent:
                type: integer
                example: 188321
              total_received:
                type: integer
                example: 186563
              total_opens:
                type: integer
                example: 141869
              total_unique_opens:
                type: integer
                example: 97476
              total_clicks:
                type: integer
                example: 1732
              total_unique_clicks:
                type: integer
                example: 1158
              total_revenue:
                type: float
                example: 1323.45
              conversion_rate:
                type: integer
                description: |
                  The **conversion_rate** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaign conversions within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaign conversions within a date range. Enter the string in 'yyyy-mm-dd' format.
                example: 0.013
              total_bounces:
                type: integer
                example: 1758
              total_soft_bounces:
                type: integer
                example: 1758
              total_hard_bounces:
                type: integer
                example: 0
              total_unsubscribes:
                type: integer
                example: 119
              total_complaints:
                type: integer
                example: 14
              created_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
              updated_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
              total_pages:
                type: integer
                example: 52
              sends:
                type: object
                description: |
                  The **sends** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns sent within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns sent within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: integer
                    example: 11370
                  campaign_id:
                    type: integer
                    example: 100880
                  uid:
                    type: string
                    example: "AB13EZ"
                  email:
                    type: string
                    example: "johndoe@example.com"
                  contact_id:
                    type: integer
                    example: 42817337
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  spreader_ip:
                    type: string
                    example: "11.222.333.123"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  created_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              opens:
                type: object
                description: |
                  The **opens** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns opened within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns opened within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent open event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  browser:
                    type: string
                    example: "Chrome | Mac | Unknown | desktop"
                  ip_address:
                    type: string
                    example: "11.222.333.123"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1

              clicks:
                type: object
                description: |
                  The **clicks** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns clicked within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns clicked within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent click event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  browser:
                    type: string
                    example: "Chrome | Mac | Unknown | desktop"
                  ip_address:
                    type: string
                    example: "11.222.333.123"
                  url:
                    type: string
                    format: url
                    example: "https://shop.examples.com/summer_wear/"
                  content_url_id:
                    type: integer
                    example: 60783
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              bounces:
                type: object
                description: |
                  The **bounces** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent bounce event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  blocked:
                    type: string
                  diagnostic:
                    type: string
                    example: "550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [YT3CAN01FT011.eop-CAN01.prod.protection.outlook.com 2023-06-05T08:32:23.957Z 08DB80F75B69EE6F]"
                  error:
                    type: string
                    example: "5.4.1"
                  hard_bounce:
                    type: boolean
                    example: true
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  type:
                    type: string
                    description: |
                      * **soft** - indicates a temporary rejection
                      * **hard** - indicates a permanent rejection
                    example: "hard"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_on:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              soft_bounces:
                type: object
                description: |
                  The **soft_bounces** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  blocked:
                    type: string
                  diagnostic:
                    type: string
                    example: "452 4.2.2 The recipient's inbox is out of storage space. Please direct the 4.2.2 recipient to 4.2.2 https://support.google.com/mail/?p=OverQuotaTemp 8926c6da1cb9f-4de0487bf2esi8168528173.6 - gsmtp"
                  error:
                    type: string
                    example: "4.2.2"
                  hard_bounce:
                    type: boolean
                    example: false
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  type:
                    type: string
                    example: "soft"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_on:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              hard_bounces:
                type: object
                description: |
                  The **hard_bounces** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns that bounced within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent bounce event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  blocked:
                    type: string
                  diagnostic:
                    type: string
                    example: "550 5.4.1 Recipient address rejected: Access denied. AS(201806281) [YT3CAN01FT011.eop-CAN01.prod.protection.outlook.com 2023-06-05T08:32:23.957Z 08DB80F75B69EE6F]"
                  error:
                    type: string
                    example: "5.4.1"
                  hard_bounce:
                    type: boolean
                    example: true
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  type:
                    type: string
                    example: "hard"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_on:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              unsubscribes:
                type: object
                description: |
                  The **unsubscribes** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns sent within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns sent within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    type: integer
                  account_id:
                    type: integer
                    example: 11370
                  campaign_id:
                    type: integer
                    example: 100880
                  uid:
                    type: string
                    example: "AB13EZ"
                  email:
                    type: string
                    example: "johndoe@example.com"
                  contact_id:
                    type: integer
                    example: 42817337
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  list_id:
                    type: integer
                    example: 17
                  reason:
                    type: string
                    description: |
                      The code defines how the unsubscribe request was received and recorded for the contact.
                      * **A** - via a REST API call.
                      * **B** - because of a hard bounce.
                      * **C** - via a spam complaint that the contact submitted.
                      * **I** - via a list import.
                      * **S** - via excessive consecutive "mail box is full" soft bounces.
                      * **T** - unsubscribed from a transactional email. 
                      * **W** - via the "Manage Subscriptions" page.
                    example: "W"
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  recorded_on:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              complaints:
                type: object
                description: |
                  The **complaints** object includes the following optional arguments:
                  * **from** - use this argument when you want to select campaigns that received a spam complaint within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **to** - use this argument when you want to select campaigns that received a spam complaint within a date range. Enter the string in 'yyyy-mm-dd' format.
                  * **unique** - the default value is 'false'. If you set to 'true', then only the most recent complaint event for each campaign will be returned.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  account_id:
                    type: number
                    example: 11370
                  uid:
                    type: string
                    example: "AB13EZ"
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  campaign_id:
                    type: number
                    example: 100880
                  campaign_tags:
                    type: array
                    items:
                      - type: string
                        example: "affilate"
                      - type: string
                        example: "promotions"
                  id:
                    type: integer
                  spreader_ip:
                    type: string
                    description: the Marketing Cloud IP address used to send the email to this contact.
                    example: "11.222.333.123"
                  esp:
                    type: string
                    description: the mailbox provider that recorded the spam complaint
                    example: "aol"  
                  custom_field_string:
                    type: string
                    example: "Gold Membership"
                  custom_field_boolean:
                    type: boolean
                    example: false
                  custom_field_datetime:
                    type: boolean
                    example: "2023-05-22T01:48:37.094-04:00"
                  custom_field_integer:
                    type: integer
                    example: 500
                  custom_field_float:
                    type: float
                    example: 147.32
                  custom_field_text:
                    type: text
                    example: "large text_part"
                  created_at:
                    type: date-time
                    example: "2023-05-22T01:48:37.094-04:00"
                  total_pages:
                    type: integer
                    example: 1
              orders:
                type: object
                description: |
                  The **orders** object includes the following optional arguments:
                  * **from** - allows you to select orders from a data range according to when the order was originally created in the commerce system.  Enter the string in 'yyyy-mm-dd' format.
                  * **to** - allows you to select orders from a data range according to when the order was originally created in the commerce system.  Enter the string in 'yyyy-mm-dd' format.
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    description: The ID of the Order record in Marketing Cloud
                    type: integer
                    example: 33
                  account_id:
                    type: integer
                    example: 11370
                  grand_total:
                    type: float
                    example: 137.03
                  order_date:
                    type: date-time
                    description: The timestamp of when the original order was created in the commerce system
                    example: '2023-06-01T13:07:25.445-04:00'
                  order_status:
                    type: string
                    example: SALE
                  contact_id:
                    type: integer
                    example: 5416596
                  email:
                    type: string
                    example: "johndoe@example.com"
                  original_order_id:
                    type: string
                    description: The ID of the Order originally assigned by the commerce system
                    example: "N142"
                  campaign_id:
                    type: integer
                    example: 98223
                  source_name:
                    type: string
                    description: The URL of the web store
                    example: "myShop.neto.com.au"                    
                  source_type:
                    type: string
                    description: The type of eCommerce site of your webstore
                    example: neto
                  coupon_code:
                    type: string
                    example: "DISCOUNT-50"
                  created_at:
                    type: date-time
                    description: The timestamp of when the Order record was created in Marketing Cloud
                    example: '2023-06-01T13:07:25.445-04:00'
                  updated_at:
                    type: date-time
                    description: The timestamp of when the Order record was last updated in Marketing Cloud
                    example: '2023-06-01T13:07:25.445-04:00'
                  total_pages:
                    type: integer
                    example: 1
                  order_items:
                    type: object
                    description: |
                      The **order_items** object includes the following optional arguments:
                      * **per** - allows you to set the number of records returned in the response payload.
                      * **page** - allows you to iterate through each virtual "page" of output.
                    properties:
                      id:
                        type: number
                        example: 123
                      account_id:
                        type: number
                        example: 11370
                      campaign_id:
                        type: number
                        example: 100880
                      contact_id:
                        type: integer
                        example: 42817337
                      order_id:
                        type: integer
                        example: 33
                      item_id:
                        type: string
                        description: The Product SKU
                        example: "BLESH012"
                      product_id:
                        type: integer
                        example: 123
                      price:
                        type: float
                        example: 12.35
                      quantity:
                        type: integer
                        example: 3
                      total:
                        type: float
                        example: 37.05
                      created_at:
                        type: date-time
                        description: The timestamp of when the Order Item record was created in Marketing Cloud
                        example: '2023-06-01T13:07:25.445-04:00'
                      updated_at:
                        type: date-time
                        description: The timestamp of when the Order Item record was last updated in Marketing Cloud
                        example: '2023-06-01T13:07:25.445-04:00'
                      total_pages:
                        type: integer
                        example: 1
                  products:
                    type: object
                    description: |
                      The **products** object includes the following optional arguments:
                      * **per** - allows you to set the number of records returned in the response payload.
                      * **page** - allows you to iterate through each virtual "page" of output.
                    properties:
                      id:
                        type: integer
                        example: 123
                      account_id:
                        type: integer
                        example: 11370
                      cart_id:
                        type: string
                        description: Indicates that this product came from a web store classified as an eCommerce shopping cart application.
                        example: "clickbank"
                      crm_id:
                        type: string
                        description: Indicates that this product came from a web store classified as a CRM application.
                        example: "neto"
                      item_id:
                        type: string
                        description: The Product SKU
                        example: "BLESH012"
                      name:
                        type: string
                        example: "Blue Eyeliner"
                      description:
                        type: string
                        example: "Blue Eyeliner with Aloe"
                      adcode:
                        type: string
                        example: null
                      category:
                        type: string
                        example: Cosmetics
                      image_url:
                        type: string
                        format: url
                        description: Full URL of the product image
                        example: "https://myShop.neto.com.au/products/product_image.jpeg"
                      store_url:
                        type: string
                        format: url
                        description: Full URL of the product's landing page
                        example: "https://myShop.neto.com.au/products/product_landing_page.html"
                      status:
                        type: boolean
                        description: Is this product currently available for sale in the web store?
                        example: true
                      published:
                        type: boolean
                        description: Is this product currently visible in the web store?
                        example: true
                      availability:
                        type: integer
                        description: How many items are currently in inventory for sale?
                        example: 5000
                      brand:
                        type: string
                        example: "Max Factor"
                      created_at:
                        type: date-time
                        description: The timestamp of when the Product record was created in Marketing Cloud
                        example: '2023-06-01T13:07:25.445-04:00'
                      updated_at:
                        type: date-time
                        description: The timestamp of when the Product record was last updated in Marketing Cloud
                        example: '2023-06-01T13:07:25.445-04:00'
              contact_revenues:
                type: object
                description: |
                  The **products** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    type: integer
                    example: 123
                  email:
                    type: string
                    example: "johndoe@example.com"
                  total_revenue:
                    type: float
                    example: 199.07
                  total_pages:
                    type: integer
                    example: 1

      journeys(GraphQL):
        type: object
        properties:
          "query Journeys":
            type: object
            properties:
              journey:
                type: string
                example: "Sugar Buster Lead Conversion and Upsell Journey"
              sent:
                type: integer
                example: 1390002
              delivered:
                type: integer
                example: 1350926
              open:
                type: integer
                example: 658982
              unique_open:
                type: integer
                example: 530821
              click:
                type: integer
                example: 16854
              unique_clicks:
                type: integer
                example: 10980
              bounce:
                type: integer
                description: Count of contacts whose emails bounced at least once.
                example: 39012
              total_bounces:
                type: integer
                description: Total count of bounces including multiple bounces per contact.
                example: 39076
              unsubs:
                type: integer
                example: 13509
              complaints:
                type: integer
                example: 135
              unique_complaints:
                type: integer
                example: 135
              conversion_rate:
                type: float
                example: .0062
              total_revenue:
                type: float
                example: 4325.87
              created_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
              updated_at:
                type: date-time
                example: "2023-01-10T08:30:00.000-04:00"
              total_pages:
                type: integer
                example: 20
              campaigns:
                type: object
                description: |
                  The **campaigns** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    type: integer
                    description: the journey campaign ID
                    example: 100880
                  name:
                    type: string
                    example: "2023-01-10 Solo Newsletter: AquaTrue"
                  sent:
                    type: integer
                    example: 188321
                  delivered:
                    type: integer
                    example: 186563
                  open:
                    type: integer
                    example: 141869
                  unique_open:
                    type: integer
                    exmpale: 97476
                  click:
                    type: integer
                    example: 1732
                  unique_clicks:
                    type: integer
                    example: 1158
                  bounce:
                    type: integer
                    description: Count of contacts whose email bounced at least once.
                    example: 1758
                  total_bounces:
                    type: integer
                    description: Total count of bounces including multiple bounces per contact.
                    example: 1758
                  unsubs:
                    type: integer
                    example: 119
                  complaints:
                    type: integer
                    example: 14
                  unique_complaints:
                    type: integer
                    example: 14
                  conversion_rate:
                    type: float
                    example: .013
                  total_revenue:
                    type: float
                    example: 1323.45
                  created_at:
                    type: date-time
                    example: "2023-01-10T08:30:00.000-04:00"
                  updated_at:
                    type: date-time
                    example: "2023-01-10T08:30:00.000-04:00"
                  total_pages:
                    type: integer
                    example: 52

      orders(GraphQL):
        type: object
        properties:
          "query Orders":
            type: object
            properties:
              id:
                description: The ID of the Order record in Marketing Cloud
                type: integer
                example: 33
              original_order_id:
                type: string
                description: The ID of the Order originally assigned by the commerce system
                example: "N142"
              account_id:
                type: integer
                example: 11370
              campaign_id:
                type: integer
                example: 98223
              contact_id:
                type: integer
                example: 5416596
              email:
                type: string
                example: "johndoe@example.com"
              uid:
                type: string
                example: "AB13EZ"
              grand_total:
                type: float
                example: 137.03
              order_date:
                type: date-time
                description: The timestamp of when the original order was created in the commerce system
                example: '2023-06-01T13:07:25.445-04:00'
              order_status:
                type: string
                example: SALE
              source_name:
                type: string
                description: The URL of the web store
                example: "myShop.neto.com.au"                    
              source_type:
                type: string
                description: The type of eCommerce site of your webstore
                example: neto
              coupon_code:
                type: string
                example: "DISCOUNT-50"
              created_at:
                type: date-time
                description: The timestamp of when the Order record was created in Marketing Cloud
                example: '2023-06-01T13:07:25.445-04:00'
              updated_at:
                type: date-time
                description: The timestamp of when the Order record was last updated in Marketing Cloud
                example: '2023-06-01T13:07:25.445-04:00'
              total_pages:
                type: integer
                example: 1
              order_items:
                type: object
                description: |
                  The **order_items** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    type: number
                    example: 123
                  account_id:
                    type: number
                    example: 11370
                  campaign_id:
                    type: number
                    example: 100880
                  contact_id:
                    type: integer
                    example: 42817337
                  email:
                    type: string
                    example: "johndoe@example.com"
                  uid:
                    type: string
                    example: "AB13EZ"
                  order_id:
                    type: integer
                    example: 33
                  item_id:
                    type: string
                    description: The Product SKU
                    example: "BLESH012"
                  product_id:
                    type: integer
                    example: 123
                  price:
                    type: string
                    example: "12.35"
                  quantity:
                    type: integer
                    example: 3
                  total:
                    type: string
                    example: "37.05"
                  created_at:
                    type: date-time
                    description: The timestamp of when the Order Item record was created in Marketing Cloud
                    example: '2023-06-01T13:07:25.445-04:00'
                  updated_at:
                    type: date-time
                    description: The timestamp of when the Order Item record was last updated in Marketing Cloud
                    example: '2023-06-01T13:07:25.445-04:00'
                  total_pages:
                    type: integer
                    example: 1
              products:
                type: object
                description: |
                  The **products** object includes the following optional arguments:
                  * **per** - allows you to set the number of records returned in the response payload.
                  * **page** - allows you to iterate through each virtual "page" of output.
                properties:
                  id:
                    type: integer
                    example: 123
                  account_id:
                    type: integer
                    example: 11370
                  cart_id:
                    type: string
                    description: Indicates that this product came from a web store classified as an eCommerce shopping cart application.
                    example: "clickbank"
                  crm_id:
                    type: string
                    description: Indicates that this product came from a web store classified as a CRM application.
                    example: "neto"
                  item_id:
                    type: string
                    description: The Product SKU
                    example: "BLESH012"
                  name:
                    type: string
                    example: "Blue Eyeliner"
                  description:
                    type: string
                    example: "Blue Eyeliner with Aloe"
                  adcode:
                    type: string
                    example: null
                  category:
                    type: string
                    example: Cosmetics
                  image_url:
                    type: string
                    format: url
                    description: Full URL of the product image
                    example: "https://myShop.neto.com.au/products/product_image.jpeg"
                  store_url:
                    type: string
                    format: url
                    description: Full URL of the product's landing page
                    example: "https://myShop.neto.com.au/products/product_landing_page.html"
                  status:
                    type: boolean
                    description: Is this product currently available for sale in the web store?
                    example: true
                  published:
                    type: boolean
                    description: Is this product currently visible in the web store?
                    example: true
                  availability:
                    type: string
                    description: How many items are currently in inventory for sale?
                    example: "5000"
                  brand:
                    type: string
                    example: "Max Factor"
                  created_at:
                    type: date-time
                    description: The timestamp of when the Product record was created in Marketing Cloud
                    example: '2023-06-01T13:07:25.445-04:00'
                  updated_at:
                    type: date-time
                    description: The timestamp of when the Product record was last updated in Marketing Cloud
                    example: '2023-06-01T13:07:25.445-04:00'

      products(GraphQL):
        type: object
        properties:
          "query Products":
            type: object
            properties:
              id:
                type: integer
                example: 123
              account_id:
                type: integer
                example: 11370
              cart_id:
                type: string
                description: Indicates that this product came from a web store classified as an eCommerce shopping cart application.
                example: "clickbank"
              crm_id:
                type: string
                description: Indicates that this product came from a web store classified as a CRM application.
                example: "neto"
              item_id:
                type: string
                description: The Product SKU
                example: "BLESH012"
              name:
                type: string
                example: "Blue Eyeliner"
              description:
                type: string
                example: "Blue Eyeliner with Aloe"
              adcode:
                type: string
                example: null
              category:
                type: string
                example: Cosmetics
              image_url:
                type: string
                format: url
                description: Full URL of the product image
                example: "https://myShop.neto.com.au/products/product_image.jpeg"
              store_url:
                type: string
                format: url
                description: Full URL of the product's landing page
                example: "https://myShop.neto.com.au/products/product_landing_page.html"
              status:
                type: boolean
                description: Is this product currently available for sale in the web store?
                example: true
              published:
                type: boolean
                description: Is this product currently visible in the web store?
                example: true
              availability:
                type: integer
                description: How many items are currently in inventory for sale?
                example: 5000
              brand:
                type: string
                example: "Max Factor"
              created_at:
                type: date-time
                description: The timestamp of when the Product record was created in Marketing Cloud
                example: '2023-06-01T13:07:25.445-04:00'
              updated_at:
                type: date-time
                description: The timestamp of when the Product record was last updated in Marketing Cloud
                example: '2023-06-01T13:07:25.445-04:00'
