openapi: 3.0.0
info:
  title: Platform REST APIs
  version: Evergreen
servers:
  - url: 'https://prod.apigateway.co/platform'
    description: Production
  - description: Demo
    url: 'https://demo.apigateway.co/platform'
  - description: Local
    url: '{local}/platform'
  - url: 'http://localhost:11001/platform'
    description: Localhost
paths:
  /businessLocations:
    post:
      summary: Create Business Location
      operationId: post-businessLocations
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/businessLocations'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the newly created business location
          headers:
            Location:
              schema:
                type: string
                format: uri
              description: The address of the newly created business location
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/businessLocations'
            examples:
              Example Request:
                value:
                  type: businessLocations
                  attributes:
                    customerIdentifier: string
                    name: string
                    address:
                      line1: 109 8th Street E.
                      line2: Suite 23
                      city: string
                      postalCode: S7M 1R3
                      regionCode: CA-SK
                      countryCode: CA
                    phoneNumbers:
                      - string
                    serviceAreaBusiness: true
                    geoCoordinate:
                      latitude: -90
                      longitude: -180
                    hours:
                      - hoursTypeId: general
                        regularHours:
                          - openDay: wednesday
                            closeDay: wednesday
                            openTime: '09:00'
                            closeTime: '17:00'
                        specialHours:
                          - status: open
                            startDate: '2019-08-24'
                            endDate: '2019-08-24'
                            startTime: '09:45'
                            endTime: '16:45'
                    tollFreeNumber: string
                    trackingNumbers:
                      - string
                    commonNames:
                      - string
                  relationships:
                    businessPartner:
                      data:
                        type: partners
                        id: ABC
                    businessCategories:
                      data:
                        - type: businessCategories
                          id: 'active:diving:freediving'
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Used to record basic data for a new location.

        The following members must be populated during creation:
        - `relationships.businessPartner.data.id`
        - `attributes.name`
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - business
        - OAuth2Prod:
            - business
      tags:
        - Business Locations
    options:
      operationId: options-businessLocations
      summary: List valid HTTP verbs for /businessLocations
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Business Locations
    get:
      summary: List Business Locations
      operationId: get-businessLocations
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/businessLocations'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of business locations can be gotten from
                        format: uri
                  meta:
                    type: object
                    x-stoplight:
                      id: 9c9hcw9pdy3iy
                    properties:
                      error:
                        type: array
                        x-stoplight:
                          id: qg547xfmaujg5
                        items:
                          x-stoplight:
                            id: ykm7pgshfp82r
                          type: object
                          properties:
                            ID:
                              type: string
                              x-stoplight:
                                id: 3s1xmzarzaaf6
                              example: AG-XXXXXXXX
                            Message:
                              type: string
                              x-stoplight:
                                id: m3i058fvfdhvq
                              example: Account not found
        '500':
          description: |-
            Internal Server Error
            * duplicate filter ids, and other unkown errors
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of business locations
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[businessPartner.id]'
          description: Return business locations for the specified partner
          required: true
        - schema:
            type: string
          in: query
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
          name: 'page[cursor]'
        - schema:
            type: string
            maxLength: 25
            default: '25'
            minLength: 1
          in: query
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
          name: 'page[limit]'
        - schema:
            type: string
            enum:
              - createdAt
              - '-createdAt'
              - name
              - '-name'
              - updatedAt
              - '-updatedAt'
            default: '-updatedAt'
          in: query
          name: sort
          description: Sort busines location based on selected option. Defaulted to -updatedAt (Desc updatedAt)
        - schema:
            type: boolean
          in: query
          name: useNewCategory
          description: 'useNewCategory is of type boolean which returns new/old business categories.If value of useNewCategory is true then it will return new business categories , if false then it will return old business categories.In case of not set, it will return categories as per feature flag.'
        - schema:
            type: string
            example: 'name,phoneNumbers,hours'
          in: query
          name: 'fields[businessLocations]'
          description: 'Filter businessLocations by the following fields: name, phoneNumbers, customerIdentifier, geoCoordinate, serviceAreaBusiness, hours, and updatedAt. These fields will be included in the response.'
        - schema:
            type: array
            items:
              type: string
            example: '["AG-123","AG-456"]'
          in: query
          name: 'filter[id]'
          description: 'Return accounts for given ids. For this filter ,We are not supporting pagination.'
      security:
        - OAuth2Demo:
            - business
            - 'business:read'
        - OAuth2Prod:
            - business
            - 'business:read'
      tags:
        - Business Locations
      x-lifecycle:
        status: trustedTester
  '/businessLocations/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Business Location
      tags:
        - Business Locations
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/businessLocations'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
      operationId: get-businessLocations-id
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns basic data about the business location.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: boolean
          in: query
          description: 'useNewCategory is of type boolean which returns new/old business categories.If value of useNewCategory is true then it will return new business categories , if false then it will return old business categories.In case of not set, it will return categories as per feature flag.'
          name: useNewCategory
        - schema:
            type: string
            example: 'name,phoneNumbers,hours'
          in: query
          name: 'fields[businessLocations]'
          description: 'Filter businessLocations by the following fields: name, phoneNumbers, customerIdentifier, geoCoordinate, serviceAreaBusiness, hours, and updatedAt. These fields will be included in the response.'
      security:
        - OAuth2Demo:
            - business
            - 'business:read'
        - OAuth2Prod:
            - business
            - 'business:read'
    options:
      operationId: options-businessLocations-id
      summary: 'List valid HTTP verbs for /businessLocations/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Business Locations
    patch:
      summary: Update Business Location
      operationId: patch-businessLocations-id
      tags:
        - Business Locations
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Update the existing business location.
        Only the root ID and type fields are required. All others are optional and will keep their original value if omitted.
      x-lifecycle:
        status: trustedTester
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - business
        - OAuth2Prod:
            - business
      responses:
        '200':
          description: Ok
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/businessLocations'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the updated business location
          headers: {}
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/businessLocations'
  /users:
    post:
      summary: Create User
      operationId: post-users
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the newly created user
          headers:
            Location:
              schema:
                type: string
                format: uri
              description: The address of the newly created user
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/users'
            examples:
              Example 1:
                value:
                  data:
                    type: users
                    attributes:
                      givenName: William
                      familyName: Smith
                      greetingName: Billy
                      email: bill@example.com
                      languageLocaleCode: en-US
                      phoneNumbersSet: true
                      phoneNumbers:
                        - number: +1-306-555-1234 ext. 56
                          typeCode: mobile
                      address:
                        line1: 109 8th Street E.
                        line2: Suite 23
                        streetAddress: 109 8th Street E.
                        additionalAddress: Suite 23
                        city: Saskatoon
                        postalCode: S7M 1R3
                        regionCode: CA-SK
                        countryCode: CA
                      timeZone: America/Regina
                    relationships:
                      partner:
                        data:
                          type: partners
                          id: ABC
                      businessLocations:
                        data:
                          - type: businessLocations
                            id: AG-1234567
                      platformAccess:
                        data:
                          - type: appFeatures
                            id: 'pc:access'
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Used to record basic data for a new location.

        The following members must be populated during creation:
        - `relationships.partner.data.id`
        - `attributes.email`
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - Users
    options:
      operationId: options-users
      summary: List valid HTTP verbs for /users
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Users
    get:
      summary: List Users
      operationId: get-users
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of users can be gotten from
                        format: uri
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of users
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[partner.id]'
          description: Return users for the specified partner. Required except when filtering by id.
        - schema:
            type: string
          in: query
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
          name: 'page[cursor]'
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          in: query
          description: 'The maximum number of users you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
          name: 'page[limit]'
        - schema:
            type: array
            example:
              - 'U-12342,U-5345'
            items:
              type: string
          in: query
          name: 'filter[id]'
          description: A comma separated list of user ids to fetch in a batch
        - schema:
            type: string
          in: query
          name: 'filter[searchTerm]'
          description: A string containing a partial name or email address. The results order is not affected by the quality of this match.
        - schema:
            type: string
          in: query
          name: 'filter[email]'
          description: A string containing a complete email that must be an exact match.
        - schema:
            type: array
            items:
              type: string
              enum:
                - business
                - partner
                - bot
          in: query
          name: 'filter[category]'
          description: 'Filter the users based on the broad category that they fall into. In some rare cases users may be part of multiple categories. '
      security:
        - OAuth2Demo:
            - user.admin
            - user.list
        - OAuth2Prod:
            - user.admin
            - user.list
      tags:
        - Users
      x-lifecycle:
        status: trustedTester
  '/users/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get User
      tags:
        - Users
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
      operationId: get-users-id
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns information about a single user. The fields you are able to use will be affected by the combination of scopes that you were granted access to.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
      security:
        - OAuth2Demo:
            - user.admin
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.permission
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - email
            - phone
            - address
        - OAuth2Prod:
            - user.admin
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.permission
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - email
            - phone
            - address
    options:
      operationId: options-users-id
      summary: 'List valid HTTP verbs for /users/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Users
    patch:
      summary: Update User
      operationId: patch-users-id
      tags:
        - Users
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Proposed`

        Update the existing user.
        Only the root ID and type fields are required. All others are optional and will keep their original value if omitted.
      x-lifecycle:
        status: proposed
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      responses:
        '200':
          description: Ok
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the updated user
          headers: {}
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/users'
            examples:
              Example 1:
                value:
                  data:
                    type: users
                    id: U-3ca38c57-7677-45d4-81e8-cd29eab91d63
                    attributes:
                      givenName: William
                      familyName: Smith
                      greetingName: Billy
                      email: bill@example.com
                      languageLocaleCode: en-US
                      phoneNumbersSet: true
                      phoneNumbers:
                        - number: +1-306-555-1234 ext. 56
                          typeCode: mobile
                      address:
                        line1: 109 8th Street E.
                        line2: Suite 23
                        streetAddress: 109 8th Street E.
                        additionalAddress: Suite 23
                        city: Saskatoon
                        postalCode: S7M 1R3
                        regionCode: CA-SK
                        countryCode: CA
                      timeZone: America/Regina
                    relationships:
                      partner:
                        data:
                          type: partners
                          id: ABC
                      businessLocations:
                        data:
                          - type: businessLocations
                            id: AG-1234567
                      platformAccess:
                        data:
                          - type: appFeatures
                            id: 'pc:access'
    delete:
      summary: Delete User
      operationId: delete-users-id
      responses:
        '204':
          description: No Content
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Deleting a user will remove personal data from it and prevent the ID from being used again in the future.
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - Users
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
      x-lifecycle:
        status: trustedTester
  /purchases:
    get:
      summary: List Purchases
      tags:
        - Purchases
      operationId: get-purchases
      security:
        - OAuth2Demo:
            - financial
        - OAuth2Prod:
            - financial
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of wholesale purchases made.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[partner.id]'
          description: Only return purchases that for the specified partner
          required: true
        - schema:
            type: string
            format: date-time
          in: query
          name: 'filter[createdAt][>]'
          description: Only return purchases created after the specified time
        - schema:
            type: string
            format: date-time
          in: query
          name: 'filter[createdAt][<]'
          description: Only return purchases created before the specified time
        - schema:
            type: integer
            minimum: 0
            maximum: 100
            default: 10
          in: query
          name: 'page[limit]'
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/purchases'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of purchases can be gotten from
                        format: uri
    options:
      operationId: options-purchases
      summary: List valid HTTP verbs for /purchases
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Purchases
  /businessCategories:
    get:
      summary: List Business Categories
      operationId: get-businessCategories
      tags:
        - Business Categories
      security:
        - OAuth2Demo:
            - business
        - OAuth2Prod:
            - business
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of business categories
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: integer
            minimum: 0
            maximum: 1000
            default: 10
          in: query
          name: 'page[limit]'
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: header
          name: Accept-Language
        - schema:
            type: array
            items:
              type: string
            example: '["id1","id2"]'
          in: query
          name: 'filter[ids]'
          description: Returns Business Categories that match the provided IDs.
        - schema:
            type: array
            items:
              type: string
            example: '["yextId"]'
          in: query
          name: 'filter[yextIds]'
          description: Returns Business Categories that match the provided yextIds.
        - schema:
            type: string
          in: query
          name: 'filter[searchTerm]'
          description: Returns a list of Business Categories based on a given search term.
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/businessCategories'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of business categories can be gotten from
                        format: uri
              examples: {}
    options:
      operationId: options-businessCategories
      summary: List valid HTTP verbs for /businessCategories
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Business Categories
  /orders:
    post:
      summary: Create Order
      tags:
        - Orders
      operationId: post-orders
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orders'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the newly created order
              examples:
                Create order:
                  value:
                    data:
                      id: 'AG-1234567:ORD-1234567'
                      type: orders
                      attributes:
                        statusCode: processing
                        currencyCode: USD
                        lineItems:
                          - productId: MP-abc123
                            quantity: 1
                      relationships:
                        businessLocation:
                          data:
                            id: AG-1234567
                            type: businessLocations
                    links:
                      self: 'https://prod.apigateway.co/platform/orders/AG-1234567:ORD-1234567'
          headers:
            Location:
              schema:
                type: string
                format: uri
              description: The address of the newly created order
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/orders'
            examples:
              Create order:
                value:
                  data:
                    type: orders
                    attributes:
                      currencyCode: USD
                      lineItems:
                        - productId: MP-abc123
                          quantity: 1
                    relationships:
                      businessLocation:
                        data:
                          id: AG-1234567
                          type: businessLocations
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Use this operation to create a new order for a business.

        By default all orders created by API start out in the `processing` status and do not require approval by either the partner admin or SMB admin. You may create orders with a statusCode of `draft` to simply pre populate the order and then finish processing within the platform. To create an order and send it to admins for approval use the statusCode of `submitted`. 

        <!-- theme: warning -->
        >Note: For newly created Business Locations/Sales Account it does take a few seconds for the newly created account to be replicated to the billing system and for the billing system to setup some additional records for it. It is usually under 5 seconds  but may take a little longer on high traffic days.
        >
        >We recommend checking for the `NotReady` status code in the error response and retrying on that with an exponential backoff.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
    options:
      operationId: options-orders
      summary: 'List valid HTTP verbs for /orders/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Orders
    get:
      summary: List Orders
      operationId: get-orders
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/orders'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of orders can be gotten from
                        format: uri
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of orders.
      security:
        - OAuth2Demo:
            - order
            - 'order:read'
        - OAuth2Prod:
            - order
            - 'order:read'
      parameters:
        - schema:
            type: string
          in: query
          name: 'filter[partner.id]'
          description: Return orders for the specified partner
          required: true
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'page[limit]'
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: header
          name: Authorization
          required: true
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
        - schema:
            type: string
          in: query
          name: 'filter[businessLocation.id]'
          description: The ID of the business location for which you want to retrieve the order details
      tags:
        - Orders
      x-lifecycle:
        status: trustedTester
  '/orders/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: The id of the order to be returned
    get:
      summary: Get Order
      tags:
        - Orders
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orders'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
              examples:
                Get order:
                  value:
                    data:
                      id: 'AG-1234567:ORD-1234567'
                      type: orders
                      attributes:
                        statusCode: processing
                        currencyCode: USD
                        lineItems:
                          - productId: MP-abc123
                            quantity: 1
                      relationships:
                        businessLocation:
                          data:
                            id: AG-1234567
                            type: businessLocations
                    links:
                      self: 'https://prod.apigateway.co/platform/orders/AG-1234567:ORD-1234567'
      operationId: get-orders-id
      security:
        - OAuth2Demo:
            - order
            - 'order:read'
        - OAuth2Prod:
            - order
            - 'order:read'
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Fetch the current values for the specified order.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    options:
      operationId: options-order-id
      summary: 'List valid HTTP verbs for /orders/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Orders
  '/orders/{id}/relationships/customFields':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Custom Fields ID
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  links:
                    type: object
                    properties:
                      related:
                        type: string
                      self:
                        type: string
                  data:
                    type: object
                    properties:
                      type:
                        type: string
                        example: orderCustomFields
                      id:
                        type: string
                        example: 'AG-1234123412:ORD-1234567'
              examples:
                Relationship Example:
                  value:
                    links:
                      related: 'https://prod.apigateway.co/platform/orders/AG-1234123412:ORD-1234567/customFields'
                      self: 'https://prod.apigateway.co/platform/orders/AG-1234123412:ORD-1234567/relationships/customFields'
                    data:
                      type: orderCustomFields
                      id: 'AG-1234123412:ORD-123456'
      operationId: get-orderCustomFieldsID-by-order
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns a reference to the custom metadata for this sales order. Use the path without `/relationships/` in it to get the actual data.

        Attributes can be set up at the partner administration page in Partner Center.
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
      x-lifecycle:
        status: trustedTester
      tags:
        - Orders
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    options:
      summary: 'List valid HTTP verbs for /orders/{id}/relationships/customFields'
      operationId: options-orderCustomFieldsID-by-order
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Orders
  '/orders/{id}/customFields':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Custom Fields
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orderCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: 'AG-1231231:ORD-1234567'
                      type: salesAccountCustomFields
                      attributes:
                        partnerFields:
                          - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-orderCustomFields-by-order
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        This endpoint acts like a alias to [Get Order Custom Fields by ID endpoint](/api-reference/legacy/platform/get-order-custom-fields-by-id). It returns custom fields about a sales order.
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
      x-lifecycle:
        status: trustedTester
      tags:
        - Orders
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    options:
      summary: 'List valid HTTP verbs for /orders/{id}/customFields'
      operationId: options-orderCustomFields-by-order
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Orders
  '/orderCustomFields/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        example: 'AG-1231231:ORD-1234567'
        description: The ID of the Custom Fields - actually the same id of the Sales Order
    patch:
      summary: Update Custom Fields
      operationId: patch-orderCustomFields-by-id
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/orderCustomFields'
              required:
                - data
            examples:
              'Example with String, Date and Integer':
                value:
                  data:
                    id: 'AG-1231231:ORD-1234567'
                    type: orderCustomFields
                    attributes:
                      partnerFields:
                        - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                          integerValue: 1000
                        - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                          stringValue: A good string value
              Example some fields using externalId instead of fieldId:
                value:
                  data:
                    id: 'AG-1231231:ORD-1234567'
                    type: orderCustomFields
                    attributes:
                      partnerFields:
                        - externalId: days-active
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - externalId: custom-nickname
                          stringValue: A good string value
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orderCustomFields'
              examples:
                Return Example:
                  value:
                    data:
                      id: 'AG-1231231:ORD-1234567'
                      type: orderCustomFields
                      attributes:
                        partnerFields:
                          - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom Fields are an additional information attached to an Order
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
      tags:
        - Order Custom Fields
    get:
      summary: Get Custom Fields by ID
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orderCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of fields can be gotten from
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: 'AG-1231231:ORD-1234567'
                      type: orderCustomFields
                      attributes:
                        partnerFields:
                          - fieldID: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldID: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldID: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-orderCustomFields-by-id
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns custom fields about a sales order.

        Attributes can be set up at the partner administration page in Partner Center.
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
      x-lifecycle:
        status: trustedTester
      tags:
        - Order Custom Fields
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
    options:
      summary: 'List valid HTTP verbs for /orderCustomFields/{id}'
      operationId: options-orderCustomFields-by-id
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Order Custom Fields
  /orderFulfillmentForms:
    get:
      summary: List Fulfillment Forms for an Order
      operationId: get-orderFulfillmentForms
      parameters:
        - schema:
            type: string
            example: 'AG-1234:ORD-1234567'
          in: query
          name: ordersID
          required: true
          description: 'The composite order ID in the form `businessId:orderId`.'
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/orderFulfillmentForms'
              examples:
                List fulfillment forms:
                  value:
                    data:
                      - id: 'AG-1234:ORD-1234567:MP-abc'
                        type: orderFulfillmentForms
                        attributes:
                          appId: MP-abc
                          status: detailsNeeded
                          fields:
                            - id: target_keywords
                              value: ''
                              label: Target Keywords
                              description: Keywords you want to rank for
                              type: textarea
                            - id: business_hours
                              value: 'Mon-Fri 9am-5pm'
                              label: Business Hours
                              type: text
                      - id: 'AG-1234:ORD-1234567:MP-xyz'
                        type: orderFulfillmentForms
                        attributes:
                          appId: MP-xyz
                          status: inReview
                          fields:
                            - id: logo_file
                              value: 'https://example.com/logo.png'
                              label: Logo
                              type: file
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns all fulfillment form submissions for the apps in a given order. Each app with a fulfillment order will have its own entry.
      security:
        - OAuth2Demo:
            - order
            - 'order:read'
        - OAuth2Prod:
            - order
            - 'order:read'
      x-lifecycle:
        status: trustedTester
      tags:
        - Order Fulfillment Forms
    options:
      summary: List valid HTTP verbs for /orderFulfillmentForms
      operationId: options-orderFulfillmentForms
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Order Fulfillment Forms
  '/orderFulfillmentForms/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        example: 'AG-1234:ORD-1234567:MP-abc'
        description: 'The composite fulfillment form ID in the form `businessId:orderId:appId`.'
    get:
      summary: Get Fulfillment Form by ID
      operationId: get-orderFulfillmentForms-by-id
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orderFulfillmentForms'
              examples:
                Fulfillment form in detailsNeeded status:
                  value:
                    data:
                      id: 'AG-1234:ORD-1234567:MP-abc'
                      type: orderFulfillmentForms
                      attributes:
                        appId: MP-abc
                        status: detailsNeeded
                        fields:
                          - id: target_keywords
                            value: ''
                            label: Target Keywords
                            description: Keywords you want to rank for
                            type: textarea
                          - id: business_hours
                            value: 'Mon-Fri 9am-5pm'
                            label: Business Hours
                            type: text
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns the latest fulfillment form submission for a specific app within an order.
      security:
        - OAuth2Demo:
            - order
            - 'order:read'
        - OAuth2Prod:
            - order
            - 'order:read'
      x-lifecycle:
        status: trustedTester
      tags:
        - Order Fulfillment Forms
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    patch:
      summary: Update Fulfillment Form
      operationId: patch-orderFulfillmentForms-by-id
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/orderFulfillmentForms'
              required:
                - data
            examples:
              Save form field data:
                value:
                  data:
                    id: 'AG-1234:ORD-1234567:MP-abc'
                    type: orderFulfillmentForms
                    attributes:
                      fields:
                        - id: target_keywords
                          value: 'plumber, emergency plumber'
                        - id: business_hours
                          value: 'Mon-Fri 9am-5pm'
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/orderFulfillmentForms'
              examples:
                Updated fulfillment form:
                  value:
                    data:
                      id: 'AG-1234:ORD-1234567:MP-abc'
                      type: orderFulfillmentForms
                      attributes:
                        appId: MP-abc
                        status: detailsNeeded
                        fields:
                          - id: target_keywords
                            value: 'plumber, emergency plumber'
                            label: Target Keywords
                            description: Keywords you want to rank for
                            type: textarea
                          - id: business_hours
                            value: 'Mon-Fri 9am-5pm'
                            label: Business Hours
                            type: text
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Saves (upserts) form field data for a specific app within an order.

        **Auto-submission:** When all required fields are filled, the fulfillment order status will automatically transition from `detailsNeeded` to `inReview` asynchronously — notifying the vendor without any additional API call. For most use cases this is sufficient and the `/actions/submit` endpoint is not needed.

        **Explicit submission:** If you need a synchronous status transition, or want to force `inReview` before all required fields are filled, use the `/orderFulfillmentForms/{id}/actions/submit` endpoint instead.
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
      x-lifecycle:
        status: trustedTester
      tags:
        - Order Fulfillment Forms
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
    options:
      summary: 'List valid HTTP verbs for /orderFulfillmentForms/{id}'
      operationId: options-orderFulfillmentForms-by-id
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Order Fulfillment Forms
  '/orderFulfillmentForms/{id}/actions/submit':
    parameters:
      - schema:
          type: string
          example: 'AG-1234:ORD-1234567:MP-abc'
        name: id
        in: path
        required: true
        description: 'Composite ID in the form `businessId:orderId:appId`.'
    post:
      summary: Submit a fulfillment form to the vendor
      operationId: post-orderFulfillmentForms-submit
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Explicitly sets the fulfillment order status to `inReview`, notifying the vendor that the form is ready for processing.

        **Note:** In most cases you do not need to call this endpoint. When all required fields are filled via PATCH, the status automatically transitions to `inReview` asynchronously. Use this endpoint only when you need a synchronous transition, or want to force submission before all required fields are filled.

        The request body is optional. If `fields` are provided, they will be saved before the status transition occurs. If the fields were already saved via PATCH, the body can be omitted.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  type: array
                  description: Optional form fields to save before submitting.
                  items:
                    $ref: '#/components/schemas/orderFormField'
            examples:
              Submit with final field values:
                value:
                  fields:
                    - id: target_keywords
                      value: 'plumber, emergency plumber'
                    - id: business_hours
                      value: 'Mon-Fri 9am-5pm'
              Submit without fields (already saved via PATCH):
                value: {}
      responses:
        '204':
          description: No Content — form submitted successfully.
        '404':
          description: Not Found — the fulfillment order was not found for the given ID.
      security:
        - OAuth2Demo:
            - order
        - OAuth2Prod:
            - order
      x-lifecycle:
        status: trustedTester
      tags:
        - Order Fulfillment Forms
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
  '/users/{id}/relationships/businessLocations':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    options:
      operationId: options-users-id-relationships-businessLocations
      summary: 'List valid HTTP verbs for /users/{id}/relationships/businessLocations'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Users
    post:
      summary: Associate user with location
      operationId: post-users-id-relationships-businessLocations
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: A list of business locations to be added
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: AG-1234567
                        description: The ID of a business location to grant access to
                      type:
                        type: string
                        description: This should always be `businessLocations`
                        default: businessLocations
                        example: businessLocations
                    required:
                      - id
                      - type
              required:
                - data
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Users can be granted access to business location(s) using the POST operation. After the operation completes, the user will have access to all their previous business locations plus any new locations in the POST request. If the user already has access to one or more of the specified locations they will be silently ignored.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - Users
    get:
      summary: Get user locations
      operationId: get-users-id-relationships-businessLocations
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Retrieves the business locations to which the User is associated.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - Users
    patch:
      summary: Replace user location access
      operationId: patch-users-id-relationships-businessLocations
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: A list of business locations to be updated
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: AG-1234567
                        description: The ID of a business location to grant access to
                      type:
                        type: string
                        description: This should always be `businessLocations`
                        default: businessLocations
                        example: businessLocations
                    required:
                      - id
                      - type
              required:
                - data
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/users'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Users can be granted access to business location(s) or removed from access to business location(s) using the PATCH operation. After the operation completes, the user will have access only to those business locations specified in the request body (if any).
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - Users
    delete:
      summary: Dissociate user from location
      operationId: delete-users-id-relationships-businessLocations
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  description: A list of business locations to be removed
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: AG-1234567
                        description: The ID of a business location to remove access
                      type:
                        type: string
                        description: This should always be `businessLocations`
                        default: businessLocations
                        example: businessLocations
                    required:
                      - id
                      - type
              required:
                - data
      responses:
        '204':
          description: No Content
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Access to business locations can be removed from a user with the DELETE operation. If the user does not already have access to one or more of the specified locations, they will be silently ignored.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - Users
  /automationRuns:
    parameters: []
    post:
      summary: Create automation run
      tags:
        - Automation Runs
      responses:
        '202':
          description: Accepted
      operationId: post-automationruns
      security:
        - OAuth2Demo:
            - business
        - OAuth2Prod:
            - business
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Create an automation run (to trigger a preconfigured automation)
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
          in: header
          name: Content-Type
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
          required: true
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/automationRuns'
    options:
      operationId: options-automationruns-id
      summary: List valid HTTP verbs for /automationRuns
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Automation Runs
  /automations:
    parameters: []
    options:
      operationId: options-automations
      tags:
        - Options
        - Automations
      summary: List valid HTTP verbs for /automations
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
    get:
      summary: List Automations
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                description: A list of automations
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/automations'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                        example: 'https://prod.apigateway.co/platform/automations?filter[businessPartner.id]=ABC&page[cursor]=&page[limit]=1'
                      next:
                        type: string
                        description: The URI at which the next batch of automations can be gotten from
                        format: uri
                        example: 'https://prod.apigateway.co/platform/automations?filter[businessPartner.id]=ABC&page[cursor]=Cg8aDUFHLTIyV1YyODVKSjY=&page[limit]=1'
              examples: {}
      operationId: list-automations
      x-lifecycle:
        status: proposed
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Proposed`

        Returns a list of automations.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[name]'
          description: 'Returns automations which name''s partially match the provided string, case insensitive'
        - schema:
            type: array
            items:
              type: string
              enum:
                - 'on'
                - 'off'
                - draining
            example: 'on'
          in: query
          name: 'filter[statuses]'
          description: 'Returns automations matching the provided state, can be: on, off, draining'
        - schema:
            type: array
            items:
              type: string
          in: query
          name: 'filter[tags]'
          description: Only return automations with all of the specified tags. You may either provide a comma-separated list of tags or specify the parameter multiple times.
        - $ref: '#/components/parameters/pageCursor'
        - $ref: '#/components/parameters/pageLimit'
        - schema:
            type: string
            enum:
              - TaskDefinition-manual-api-order-trigger
              - TaskDefinition-manual-api-account-trigger
            example: TaskDefinition-manual-api-order-trigger
          in: query
          name: 'filter[trigger]'
          description: Returns automations which have a trigger matching the provided value.
        - schema:
            type: string
          in: query
          name: 'filter[namespace]'
          description: Returns automations for the provided namespace. The namespace is a unique identifier for the automation which can be a partner ID or account ID.
          required: true
      security:
        - OAuth2Demo:
            - 'automation:read'
        - OAuth2Prod:
            - 'automation:read'
      tags:
        - Automations
  '/automations/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    options:
      operationId: options-automations-id
      tags:
        - Options
        - Automations
      summary: 'List valid HTTP verbs for /automations/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
    get:
      summary: Get Automation
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/automations'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
              examples: {}
      operationId: get-automation-by-id
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns basic data about the automation.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
      security:
        - OAuth2Demo:
            - 'automation:read'
        - OAuth2Prod:
            - 'automation:read'
      tags:
        - Automations
  /salesAccounts:
    post:
      summary: Create Sales Account
      operationId: post-salesAccounts
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/salesAccounts'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the newly created business location
              examples:
                Return Example (with ID):
                  value:
                    data:
                      id: AG-1234567
                      type: salesAccounts
                      attributes:
                        tags:
                          - tag1
                          - tag2
                        customerIdentifier: User-defined-id-123123
                        name: Company Example
                        address:
                          line1: 109 8th Street E.
                          line2: Suite 23
                          city: Saskatoon
                          stateCode: CA
                          zip: S7M 1R3
                          postalCode: S7M 1R3
                          regionCode: CA-SK
                          countryCode: CA
                        phoneNumbers:
                          - '+13068800001'
                        serviceAreaBusiness: true
                        geoCoordinate:
                          latitude: -90
                          longitude: -180
                      relationships:
                        salesPeople:
                          data:
                            - id: U-123123-123123
                              type: users
                        businessPartner:
                          data:
                            type: partners
                            id: ABC
                        businessCategories:
                          data:
                            - type: businessCategories
                              id: 'active:diving:freediving'
                        type: salesAccounts
          headers:
            Location:
              schema:
                type: string
                format: uri
              description: The address of the newly created business location
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/salesAccounts'
            examples:
              Insert Sales Account Example:
                value:
                  data:
                    type: salesAccounts
                    attributes:
                      tags:
                        - tag1
                        - tag2
                      customerIdentifier: User-defined-id-123123
                      name: Company Example
                      address:
                        line1: 109 8th Street E.
                        line2: Suite 23
                        city: Saskatoon
                        stateCode: CA
                        zip: S7M 1R3
                        postalCode: S7M 1R3
                        regionCode: CA-SK
                        countryCode: CA
                      phoneNumbers:
                        - '+13068800001'
                      serviceAreaBusiness: true
                      geoCoordinate:
                        latitude: -90
                        longitude: -180
                    relationships:
                      salesPeople:
                        data:
                          - id: U-123123-123123
                            type: users
                      businessPartner:
                        data:
                          type: partners
                          id: ABC
                      businessCategories:
                        data:
                          - type: businessCategories
                            id: 'active:diving:freediving'
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Used to record basic data for a new location.

        The following members must be populated during creation:
        - `relationships.businessPartner.data.id`
        - `attributes.name`
        - `attributes.address.countryCode` as well as other address fields based on the norms of the country.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      tags:
        - Sales Accounts
    options:
      operationId: options-salesAccounts
      summary: List valid HTTP verbs for /salesAccounts
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Sales Accounts
    get:
      summary: List Sales Accounts
      operationId: get-salesAccounts
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/salesAccounts'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of accounts can be gotten from
                        format: uri
                  meta:
                    type: object
                    x-stoplight:
                      id: hbu5nqur0qnmk
                    properties:
                      error:
                        type: array
                        x-stoplight:
                          id: s8dssb6fgtlig
                        items:
                          x-stoplight:
                            id: lxynuyj0i8hm6
                          type: object
                          properties:
                            ID:
                              type: string
                              x-stoplight:
                                id: g0v15e1y213zp
                              example: AG-XXXXXXXX
                              readOnly: true
                            Message:
                              type: string
                              x-stoplight:
                                id: pfb4q0j426bd5
                              example: Account not found
              examples:
                Return Example:
                  value:
                    id: AG-1234567
                    type: salesAccounts
                    attributes:
                      tags:
                        - tag1
                        - tag2
                      customerIdentifier: User-defined-id-123123
                      name: Company Example
                      address:
                        line1: 109 8th Street E.
                        line2: Suite 23
                        city: Saskatoon
                        stateCode: CA
                        zip: S7M 1R3
                        postalCode: S7M 1R3
                        regionCode: CA-SK
                        countryCode: CA
                      phoneNumbers:
                        - '+13068800001'
                      serviceAreaBusiness: true
                      geoCoordinate:
                        latitude: -90
                        longitude: -180
                    relationships:
                      salesPeople:
                        data:
                          - id: U-123123-123123
                            type: users
                      customFields:
                        data:
                          - id: AG-1234567
                            type: customFields
                      businessPartner:
                        data:
                          type: partners
                          id: ABC
                      businessCategories:
                        data:
                          - type: businessCategories
                            id: 'active:diving:freediving'
                      type: salesAccounts
                    included:
                      - id: AG-1231231
                        type: salesAccountCustomFields
                        partnerFields:
                          - fieldId: FieldID-1231231-12312312
                            stringValue: Text value
                            title: Title of field FieldID-1231231
                            description: Description of field FieldID-1231231
                            fieldType: string
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of sales accounts
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[businessPartner.id]'
          description: Return business locations for the specified partner
          required: true
        - schema:
            type: string
          in: query
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
          name: 'page[cursor]'
        - schema:
            type: string
            minLength: 1
            maxLength: 25
            default: '25'
          in: query
          description: 'The maximum number of accounts you would like returned in a single batch. Use the links.next member in the response to get the remainder. Any number higher than 25 will be lowered to 25. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
          name: 'page[limit]'
        - schema:
            type: string
            enum:
              - customFields
              - salesPeople
              - businessCategories
            uniqueItems: true
          in: query
          name: include
          description: A list of relationships where you would like the related records embedded in the response. This can be used to save a network request.
        - schema:
            type: string
            enum:
              - createdAt
              - '-createdAt'
              - name
              - '-name'
              - updatedAt
              - '-updatedAt'
            default: '-updatedAt'
          in: query
          name: sort
          description: Sort sales accounts based on selected option. Defaulted to -updatedAt (Desc updatedAt)
        - schema:
            type: string
          in: query
          name: 'filter[customerIdentifier]'
          description: Return the accounts within the partner that have given customer identifier.
        - schema:
            type: boolean
          in: query
          description: 'useNewCategory is of type boolean which returns new/old business categories.If value of useNewCategory is true then it will return new business categories , if false then it will return old business categories.In case of not set, it will return categories as per feature flag.'
          name: useNewCategory
        - schema:
            type: string
            example: 'name,phoneNumbers,hours'
          in: query
          name: 'fields[salesAccounts]'
          description: 'Filter salesAccounts by the following fields: name, phoneNumbers, customerIdentifier, geoCoordinate, serviceAreaBusiness, hours, and updatedAt. These fields will be included in the response.'
        - schema:
            type: array
            items:
              type: string
            example: '["AG-123","AG-456"]'
          in: query
          name: 'filter[id]'
          description: 'Return accounts for given ids. For this filter ,We are not supporting pagination.'
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      tags:
        - Sales Accounts
      x-lifecycle:
        status: trustedTester
    parameters: []
  '/salesAccounts/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Sales Accounts
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/salesAccounts'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
              examples:
                example-1:
                  value:
                    data:
                      id: AG-1234567
                      type: salesAccounts
                      attributes:
                        tags:
                          - tag1
                          - tag2
                        customerIdentifier: User-defined-id-123123
                        name: Company Example
                        address:
                          line1: 109 8th Street E.
                          line2: Suite 23
                          city: Saskatoon
                          stateCode: CA
                          zip: S7M 1R3
                          postalCode: S7M 1R3
                          regionCode: CA-SK
                          countryCode: CA
                        phoneNumbers:
                          - '+13068800001'
                        serviceAreaBusiness: true
                        geoCoordinate:
                          latitude: -90
                          longitude: -180
                      relationships:
                        salesPeople:
                          data:
                            - id: U-123123-123123
                              type: users
                        customFields:
                          data:
                            - id: AG-1234567
                              type: customFields
                        businessPartner:
                          data:
                            type: partners
                            id: ABC
                        businessCategories:
                          data:
                            - type: businessCategories
                              id: 'active:diving:freediving'
                        type: salesAccounts
                      included:
                        - id: AG-1231231
                          type: salesAccountCustomFields
                          partnerFields:
                            - fieldId: FieldID-1231231-12312312
                              stringValue: Text value
                              title: Title of field FieldID-1231231
                              description: Description of field FieldID-1231231
                              fieldType: string
      operationId: get-salesAccounts-by-id
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns basic data about the sales account.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: boolean
          in: query
          description: 'useNewCategory is of type boolean which returns new/old business categories.If value of useNewCategory is true then it will return new business categories , if false then it will return old business categories.In case of not set, it will return categories as per feature flag.'
          name: useNewCategory
        - schema:
            type: string
            example: 'name,phoneNumbers,hours'
          in: query
          name: 'fields[salesAccounts]'
          description: 'Filter salesAccounts by the following fields: name, phoneNumbers, customerIdentifier, geoCoordinate, serviceAreaBusiness, hours, and updatedAt. These fields will be included in the response.'
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      tags:
        - Sales Accounts
    options:
      operationId: options-salesAccounts-by-id
      summary: 'List valid HTTP verbs for /salesAccounts/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Sales Accounts
    patch:
      summary: Update Sales Account
      operationId: patch-salesAccounts-by-id
      tags:
        - Sales Accounts
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Update the existing business location.
        Only the root ID and type fields are required. All others are optional and will keep their original value if omitted.
      x-lifecycle:
        status: trustedTester
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      responses:
        '200':
          description: Ok
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/salesAccounts'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                        description: The address of the updated business location
              examples:
                example-1:
                  value:
                    data:
                      id: AG-1234567
                      type: salesAccounts
                      attributes:
                        tags:
                          - tag1
                          - tag2
                        customerIdentifier: User-defined-id-123123
                        name: Company Example
                        address:
                          line1: 109 8th Street E.
                          line2: Suite 23
                          city: Saskatoon
                          stateCode: CA
                          zip: S7M 1R3
                          postalCode: S7M 1R3
                          regionCode: CA-SK
                          countryCode: CA
                        phoneNumbers:
                          - '+13068800001'
                        serviceAreaBusiness: true
                        geoCoordinate:
                          latitude: -90
                          longitude: -180
                      relationships:
                        salesPeople:
                          data:
                            - id: U-123123-123123
                              type: users
                        businessPartner:
                          data:
                            type: partners
                            id: ABC
                        businessCategories:
                          data:
                            - type: businessCategories
                              id: 'active:diving:freediving'
                        type: salesAccounts
          headers: {}
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/salesAccounts'
            examples:
              example-1:
                value:
                  data:
                    id: AG-1234567
                    type: salesAccounts
                    attributes:
                      tags:
                        - tag1
                        - tag2
                      customerIdentifier: User-defined-id-123123
                      name: Company Example
                      address:
                        line1: 109 8th Street E.
                        line2: Suite 23
                        city: Saskatoon
                        stateCode: CA
                        zip: S7M 1R3
                        postalCode: S7M 1R3
                        regionCode: CA-SK
                        countryCode: CA
                      phoneNumbers:
                        - '+13068800001'
                      serviceAreaBusiness: true
                      geoCoordinate:
                        latitude: -90
                        longitude: -180
                    relationships:
                      salesPeople:
                        data:
                          - id: U-123123-123123
                            type: users
                      businessPartner:
                        data:
                          type: partners
                          id: ABC
                      businessCategories:
                        data:
                          - type: businessCategories
                            id: 'active:diving:freediving'
                      type: salesAccounts
  /subscriptionAssignments:
    parameters:
      - schema:
          type: string
        name: 'filter[businessLocationId]'
        in: query
        required: true
    get:
      summary: List Subscription Assignments
      responses:
        '200':
          description: A list of Assignments
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/subscriptionAssignment'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        format: uri
                      next:
                        type: string
                        format: uri
      operationId: get-subscriptionAssignments
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      x-lifecycle:
        status: trustedTester
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[businessLocationId]'
          description: The id of the business location you want to get a the assignments for
          required: true
      tags:
        - Subscription Assignments
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns a list of subscription assignments based on the provided filters. 

        Currently you must filter the list to a single business location at a time using `filter[businessLocationId]`

        You will receive a different record for each subscription purchased for multi-activatable products.
    options:
      summary: List valid HTTP verbs for /subscriptionAssignments
      operationId: options-subscriptionAssignments
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Subscription Assignments
  /subscriptions:
    parameters:
      - schema:
          type: string
        name: 'filter[partner.id]'
        in: query
        required: true
      - schema:
          type: string
        name: 'filter[businessLocation.id]'
        in: query
    get:
      summary: List Subscriptions
      responses:
        '200':
          description: A list of Assignments
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/subscriptions'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        format: uri
                        description: Provides a link back to the first page of results
                      next:
                        type: string
                        format: uri
                        description: The URI at which the next batch of subscriptions can be gotten from
      operationId: get-subscriptions
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      x-lifecycle:
        status: trustedTester
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[partner.id]'
          description: The partner ID.
          required: true
        - schema:
            type: string
          in: query
          name: 'filter[businessLocation.id]'
          description: The Business Location ID.
          required: true
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. Pagination Docs.
        - schema:
            type: string
            default: '25'
            minLength: 1
            maxLength: 25
          in: query
          name: 'page[limit]'
          description: The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. Pagination Docs.
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns a list of subscriptions based on the provided filters. 

        Currently you can filter the list baseed on your partnerID using `filter[partner.id]` and optionally also filter by
        the business location ID using `filter[businessLocation.id]`

        You will receive a different record for each subscription purchased for multi-activatable products.
      tags:
        - Subscriptions
    options:
      summary: List valid HTTP verbs for /subscriptions
      operationId: options-subscriptions
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Subscriptions
  '/subscriptionAssignments/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get a particular Subscription Assignment
      responses:
        '200':
          description: A particular Assignment
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/subscriptionAssignment'
      operationId: get-subscriptionAssignments-by-id
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Proposed`

        Fetch the details of a specific subscription assignment by id.
      tags:
        - Subscription Assignments
      x-lifecycle:
        status: proposed
    options:
      summary: 'List valid HTTP verbs for /subscriptionAssignments/{id}'
      operationId: options-subscriptionAssignment-id
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Subscription Assignments
  '/subscriptionAssignments/{id}/actions/requestCancellation':
    parameters:
      - schema:
          type: string
          example: 'AG-CQD6ZR6:MP-R7G3NP55T725DM5VGD:beff34a4-cccc-4be8-bd9'
        name: id
        in: path
        required: true
        description: 'The id should be a string which is in the form - businessLocationId : productId : activationId'
    post:
      summary: Cancel Subscription Assignment
      responses:
        '204':
          description: No Content
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Used for cancelling subscription assignments.

        By default all cancel request uses DeactivationType as a DeactivationTypeCancel which indicate we should turn the item off at the items anniversary date, or commitment date, whichever is later. So product is still active till the anniversary date.
      tags:
        - Subscription Assignments
      x-lifecycle:
        status: proposed
      operationId: cancel-subscriptionAssignments-by-id
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          name: Authorization
          required: true
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                reason:
                  type: array
                  description: |-
                    `crisisShiftInPriorities`due to crisis shift in priorities

                    `customerWasNotSatisfied`due to customer not satisfied with product

                    `customerReachedEndOfContract`due to customer reached end of contract

                    `movingToAComputer`due to moving to a computer

                    `productIsTooExpensive`due to product is too expensive

                    `productWasAccidentallyActivated`due to product was accidentally activated

                    `other` any other reason for cancellation
                  items:
                    type: string
                    enum:
                      - crisisShiftInPriorities
                      - customerWasNotSatisfied
                      - customerReachedEndOfContract
                      - movingToAComputer
                      - productIsTooExpensive
                      - productWasAccidentallyActivated
                      - other
                comments:
                  type: string
                  description: more description for cancellation of products
                deactivationType:
                  type: string
                  description: |-
                    `cancel` indicates we should turn the product or service off at the anniversary date, or commitment date, whichever is later and till then it will be available for use.

                    `immediate` indicates we should turn the product or service off immediately and it will no longer be available to use.
                  default: cancel
                  enum:
                    - cancel
                    - immediate
            examples:
              Example 1:
                value:
                  reason:
                    - crisisShiftInPriorities
                  comments: Due to crisis
                  deactivationType: cancel
        description: ''
    options:
      summary: 'List valid HTTP verbs for /subscriptionAssignments/{id}/actions/requestCancellation'
      operationId: options-subscriptionAssignment-requestCancellationAction
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Subscription Assignments
  '/subscriptionAssignments/{id}/actions/undoCancellation':
    parameters:
      - schema:
          type: string
          example: 'AG-CQD6ZR6:MP-R7G3NP55T725DM5VGD:beff34a4-cccc-4be8-bd9'
        name: id
        in: path
        required: true
        description: 'The id should be a string which is in the form - businessLocationId : productId : activationId'
    post:
      summary: Restore a Canceled Subscription Assignment
      responses:
        '204':
          description: No Content
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Used for restoring a canceled subscription assignment.
      tags:
        - Subscription Assignments
      x-lifecycle:
        status: proposed
      operationId: restore-subscriptionAssignments-by-id
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          name: Authorization
          required: true
    options:
      summary: 'List valid HTTP verbs for /subscriptionAssignments/{id}/actions/undoCancellation'
      operationId: options-subscriptionAssignment-undoCancellationAction
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Subscription Assignments
  '/salesAccounts/{id}/relationships/customFields':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Custom Fields ID
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  links:
                    type: object
                    properties:
                      related:
                        type: string
                      self:
                        type: string
                  data:
                    type: object
                    properties:
                      type:
                        type: string
                        example: salesAccountCustomFields
                      id:
                        type: string
                        example: AG-1234123412
              examples:
                Relationship Example:
                  value:
                    links:
                      related: 'https://prod.apigateway.co/platform/salesAccounts/AG-1234123412/customFields'
                      self: 'https://prod.apigateway.co/platform/salesAccounts/AG-1234567812/relationships/customFields'
                    data:
                      type: salesAccountCustomFields
                      id: AG-1234123412
      operationId: get-salesAccountCustomFieldsID-by-salesAccount
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns a reference to the custom metadata for this sales account. Use the path without `/relationships/` in it to get the actual data.

        Attributes can be set up at the partner administration page in Partner Center.
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      x-lifecycle:
        status: trustedTester
      tags:
        - Sales Accounts
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    options:
      summary: 'List valid HTTP verbs for /salesAccounts/{id}/relationships/customFields'
      operationId: options-salesAccountCustomFieldsID-by-salesAccount
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Sales Accounts
  '/salesAccounts/{id}/customFields':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Custom Fields
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/salesAccountCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of fields can be gotten from
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: AG-1231231
                      type: salesAccountCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-salesAccountCustomFields-by-salesAccount
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        This endpoint acts like a alias to [Get Sales Account Custom Fields by ID endpoint](/api-reference/legacy/platform/get-sales-account-custom-fields-by-id). It returns custom fields about a sales account.
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      x-lifecycle:
        status: trustedTester
      tags:
        - Sales Accounts
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    options:
      summary: 'List valid HTTP verbs for /salesAccounts/{id}/customFields'
      operationId: options-salesAccountCustomFields-by-salesAccount
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Sales Accounts
  '/salesAccountCustomFields/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        example: AG-1231231
        description: The ID of the Custom Fields - actually the same id of the Sales Account
    patch:
      summary: Update Custom Fields
      operationId: patch-salesAccountCustomFields-by-id
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/salesAccountCustomFields'
              required:
                - data
            examples:
              'Example with String, Date and Integer':
                value:
                  data:
                    id: AG-1231231
                    type: salesAccountCustomFields
                    attributes:
                      partnerFields:
                        - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                          stringValue: A good string value
              Example some fields using externalId instead of fieldId:
                value:
                  data:
                    id: AG-1231231
                    type: salesAccountCustomFields
                    attributes:
                      partnerFields:
                        - externalId: days-active
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - externalId: custom-nickname
                          stringValue: A good string value
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/salesAccountCustomFields'
              examples:
                Return Example:
                  value:
                    data:
                      id: AG-1231231
                      type: salesAccountCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom Fields are an additional information attached to a Sales Account
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      tags:
        - Sales Account Custom Fields
    get:
      summary: Get Custom Fields by ID
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/salesAccountCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of fields can be gotten from
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: AG-1231231
                      type: salesAccountCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-salesAccountCustomFields-by-id
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns custom fields about a sales account.

        Attributes can be set up at the partner administration page in Partner Center.
      security:
        - OAuth2Demo:
            - sales.account
        - OAuth2Prod:
            - sales.account
      x-lifecycle:
        status: trustedTester
      tags:
        - Sales Account Custom Fields
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
    options:
      summary: 'List valid HTTP verbs for /salesAccountCustomFields/{id}'
      operationId: options-salesAccountCustomFields-by-id
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Sales Account Custom Fields
  '/users/{id}/customFields':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Get Custom Fields
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/userCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: U-12345678-abcd-1234-abcd-123456789ab1
                      type: userCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-userCustomFields-by-userid
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        This endpoint acts like a alias to [Get User Custom Fields by ID endpoint](/api-reference/legacy/platform/get-user-custom-fields-by-id). It returns custom fields for a user.
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      x-lifecycle:
        status: trustedTester
      tags:
        - Users
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
    options:
      summary: 'List valid HTTP verbs for /users/{id}/customFields'
      operationId: options-userCustomFields-by-userid
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - User Custom Fields
  '/users/{id}/actions/sendWelcomeEmail':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
    get:
      summary: Send Welcome Email
      operationId: get-sendWelcomeEmail-by-userid
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        An email will be sent to the already created user whose user id is passed in the request.
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      x-lifecycle:
        status: trustedTester
      tags:
        - Users
        - Send Welcome Email
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
      responses:
        '202':
          description: Accepted
    options:
      summary: 'List valid HTTP verbs for/users/{id}/actions/sendWelcomeEmail'
      operationId: options-sendWelcomeEmail-by-userid
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Send Welcome Email
      responses:
        '204':
          description: No Content
  '/userCustomFields/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        example: U-12345678-abcd-1234-abcd-123456789abc
        description: The ID of the Custom Fields - actually the same id of the User
    patch:
      summary: Update Custom Fields
      operationId: patch-userCustomFields-by-id
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/userCustomFields'
              required:
                - data
            examples:
              'Example with String, Date and Integer':
                value:
                  data:
                    id: U-12345678-abcd-1234-abcd-123456789abd
                    type: userCustomFields
                    attributes:
                      partnerFields:
                        - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                          stringValue: A good string value
              Example some fields using externalId instead of fieldId:
                value:
                  data:
                    id: U-12345678-abcd-1234-abcd-123456789abd
                    type: userCustomFields
                    attributes:
                      partnerFields:
                        - externalId: days-active
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - externalId: custom-nickname
                          stringValue: A good string value
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/userCustomFields'
              examples:
                Return Example:
                  value:
                    data:
                      id: U-12345678-abcd-1234-abcd-123456789123
                      type: userCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom Fields are an additional information attached to a User
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      tags:
        - User Custom Fields
    get:
      summary: Get Custom Fields by ID
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/userCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: U-12345678-abcd-1234-abcd-123456789abe
                      type: userCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-userCustomFields-by-id
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns custom fields about a user.

        Attributes can be set up at the partner administration page in Partner Center.
      security:
        - OAuth2Demo:
            - user.admin
        - OAuth2Prod:
            - user.admin
      x-lifecycle:
        status: trustedTester
      tags:
        - User Custom Fields
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
    options:
      summary: 'List valid HTTP verbs for /userCustomFields/{id}'
      operationId: options-userCustomFields-by-id
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - User Custom Fields
  '/productCustomFields/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        example: ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV
        description: 'The ID of the Custom Fields, which is a Product ID'
    patch:
      summary: Update Custom Fields for a product
      operationId: patch-productCustomFields-by-id
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/productCustomFields'
              required:
                - data
            examples:
              'Example with String, Date and Integer':
                value:
                  data:
                    id: ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV
                    type: productCustomFields
                    attributes:
                      partnerFields:
                        - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                          stringValue: A good string value
              Example some fields using externalId instead of fieldId:
                value:
                  data:
                    id: ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV
                    type: productCustomFields
                    attributes:
                      partnerFields:
                        - externalId: days-active
                          integerValue: 1000
                        - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                          dateValue: A good date value
                        - externalId: custom-nickname
                          stringValue: A good string value
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/productCustomFields'
              examples:
                Return Example:
                  value:
                    data:
                      id: ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV
                      type: productCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom Fields are an additional information attached to a Product
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
            default: application/vnd.api+json
            enum:
              - application/vnd.api+json
          in: header
          name: Content-Type
          required: true
          description: Indicates the format of the request body being sent. In most cases you will want `application/vnd.api+json`
      security:
        - OAuth2Demo:
            - product
        - OAuth2Prod:
            - product
      tags:
        - Product Custom Fields
    get:
      summary: Get Product Custom Fields by ID
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/productCustomFields'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of fields can be gotten from
                        format: uri
              examples:
                Return Example:
                  value:
                    data:
                      id: ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV
                      type: productCustomFields
                      attributes:
                        partnerFields:
                          - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                            integerValue: 1000
                            title: Title of 123448ca field
                            description: Description for 123448ca field
                            fieldType: integer
                          - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                            dateValue: A good date value
                            title: Title of 987448ca field
                            description: Description for 987448ca field
                            fieldType: date
                          - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                            stringValue: A good string value
                            title: Title of abc448ca field
                            description: Description for abc448ca field
                            fieldType: string
      operationId: get-productCustomFields-by-id
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns custom fields for a product.

        Attributes can be set up at the partner administration page in Partner Center.
      security:
        - OAuth2Demo:
            - product
        - OAuth2Prod:
            - product
      x-lifecycle:
        status: trustedTester
      tags:
        - Product Custom Fields
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
    options:
      summary: 'List valid HTTP verbs for /productCustomFields/{id}'
      operationId: options-productCustomFields-by-id
      responses:
        '204':
          description: No Content
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Product Custom Fields
  /countries:
    get:
      summary: List Countries
      operationId: get-countries
      tags:
        - Countries
      security:
        - OAuth2Demo:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
        - OAuth2Prod:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of countries. 

        To see the regions (state/province) within a country use [/platform/countryRegions?filter[countryCode]=yourcode](/api-reference/legacy/platform/get-country-regions)
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: integer
            minimum: 0
            maximum: 1000
            default: 10
          in: query
          name: 'page[limit]'
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: header
          name: Accept-Language
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/countries'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of countries can be gotten from
                        format: uri
              examples: {}
    options:
      operationId: options-countries
      summary: List valid HTTP verbs for /countries
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Countries
  '/countries/{id}':
    get:
      summary: Get Country
      operationId: get-countries-id
      tags:
        - Countries
      security:
        - OAuth2Demo:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
        - OAuth2Prod:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Get a specific country by id
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: header
          name: Accept-Language
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/countries'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of countries can be gotten from
                        format: uri
              examples: {}
    options:
      operationId: options-countries-id
      summary: 'List valid HTTP verbs for /countries/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Countries
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: The ISO Alpha2 code for the country
  /countryRegions:
    get:
      summary: List Country Regions
      operationId: get-country-regions
      tags:
        - Countries
      security:
        - OAuth2Demo:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
        - OAuth2Prod:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Produces a list of regions within a country. 

        Note: Our list of regions currently updates based on data provided by Google. You will find that countries that do not normally use regions in their addresses do not have any listed here.
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: integer
            minimum: 0
            maximum: 1000
            default: 10
          in: query
          name: 'page[limit]'
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: header
          name: Accept-Language
        - schema:
            type: string
            pattern: '^[A-Z]{2}$'
            minLength: 2
            maxLength: 2
          in: query
          name: 'filter[countryCode]'
          required: true
          description: 'The two letter country code defined by [ISO 3166-1](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)''  Examples: CA, US, AU'
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/countryRegions'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
                      first:
                        type: string
                        description: Provides a link back to the first page of results
                        format: uri
                      next:
                        type: string
                        description: The URI at which the next batch of countries can be gotten from
                        format: uri
              examples: {}
    options:
      operationId: options-countryRegions
      summary: List valid HTTP verbs for /countryRegions
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Countries
  '/countryRegions/{id}':
    get:
      summary: Get Country Region
      operationId: get-country-regions-id
      tags:
        - Countries
      security:
        - OAuth2Demo:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
        - OAuth2Prod:
            - sales.contact
            - business
            - 'user.profile:read'
            - 'user.contact:read'
            - 'user.permission:read'
            - user.admin
            - self.user.admin
            - 'self.user.contact:read'
            - openid
            - profile
            - sales.account
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Get a specific country region's name by id
      parameters:
        - schema:
            type: string
            example: Bearer <Access Token>
            pattern: ^Bearer\s\S+
          in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
        - schema:
            type: string
          in: header
          name: Accept-Language
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/countryRegions'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        format: uri
              examples: {}
    options:
      operationId: options-countryRegions-id
      summary: 'List valid HTTP verbs for /countryRegions/{id}'
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      responses:
        '204':
          description: No Content
      tags:
        - Options
        - Countries
    parameters:
      - schema:
          type: string
          pattern: '^[A-Z]{2}-[\w]{1,3}$'
          minLength: 4
          maxLength: 6
        name: id
        in: path
        required: true
        description: The ISO region code
  '/partnerActivatableProducts/{id}':
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: SKU id
    get:
      summary: Get Partner Activatable Product
      operationId: get-partnerActivatableProducts-id
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Returns the details of a product listed in a reseller's store for a known id.
      security:
        - OAuth2Demo:
            - product
            - 'partner:read'
        - OAuth2Prod:
            - product
            - 'partner:read'
      parameters:
        - in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
          schema:
            example: Bearer <Access Token>
            type: string
            pattern: ^Bearer\s\S+
        - schema:
            type: string
          in: header
          name: Accept-Language
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/partnerActivatableProducts'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
      tags:
        - Partner Activatable Products
      x-lifecycle:
        status: trustedTester
    options:
      summary: List valid HTTP verbs for
      operationId: options-partnerActivatableProducts-id
      responses:
        '200':
          description: OK
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Partner Activatable Products
  /partnerActivatableProducts:
    get:
      summary: List Partner Activatable Products
      operationId: get-partnerActivatableProducts
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                x-examples:
                  example-1:
                    data:
                      id: string
                      type: products
                      apps:
                        - key:
                            sku: string
                          sharedMarketingInformation:
                            name: string
                            iconUrl: 'https://example.com/logo.png'
                            tagline: string
                            bannerImageUrl: string
                          parentRequirements:
                            enabled: true
                            parentDetails:
                              key:
                                appId: string
                          activationInformation:
                            requiredBusinessData: {}
                            countryRestrictions:
                              whitelist:
                                - string
                            appRestrictions:
                              requiredAppIds:
                                - string
                          price: {}
                          appType: APP_TYPE_ADDON
                    links:
                      self: string
                      first: string
                      next: string
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/partnerActivatableProducts'
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                      first:
                        type: string
                      next:
                        type: string
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Provides a list of products that can be activated by a partner for their customers. 
        You must filter the list to a single partner using the `filter[partner.id]=PID` query param. 
        Sorted by the whiteLabelName field in ascending order. 
      security:
        - OAuth2Demo:
            - 'partner:read'
            - product
        - OAuth2Prod:
            - 'partner:read'
            - product
      parameters:
        - in: header
          name: Authorization
          description: A Bearer access token to identify the user the app is acting on behalf of. See the Authorization guide for details.
          required: true
          schema:
            example: Bearer <Access Token>
            type: string
            pattern: ^Bearer\s\S+
        - schema:
            type: string
          in: header
          name: Accept-Language
        - schema:
            type: integer
            default: 10
            minimum: 0
            maximum: 100
          in: query
          name: 'page[limit]'
          description: 'The maximum number of tasks you would like returned in a single batch. Use the links.next member in the response to get the remainder. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'page[cursor]'
          description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
        - schema:
            type: string
          in: query
          name: 'filter[searchText]'
          description: A string containing a partial id or name field.
        - schema:
            type: string
          in: query
          name: 'filter[partner.id]'
          description: Return products for the specified partner
          required: true
      x-lifecycle:
        status: trustedTester
      tags:
        - Partner Activatable Products
    parameters: []
    options:
      summary: List valid HTTP verbs for /partnerActivatableProducts
      operationId: options-partnerActivatableProducts
      responses:
        '200':
          description: OK
      description: 'Used solely for [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) the OPTIONS request returns the list of possible HTTP methods and other headers that browsers use to protect user''s security. You should not call this operation directly. '
      tags:
        - Options
        - Partner Activatable Products
components:
  parameters:
    pageLimit:
      name: 'page[limit]'
      in: query
      required: false
      schema:
        type: number
        maximum: 100
        minimum: 1
        default: 25
      description: 'The maximum number of items you would like returned in a single batch. Use the links.next member in the response to get the next batch. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
    pageCursor:
      name: 'page[cursor]'
      in: query
      required: false
      schema:
        type: string
      description: 'The cursor stores all your filters and current location in the list to allow paging over the results in smaller batches. The value will be provided in the response links. [Pagination Docs](https://developers.vendasta.com/platform/ZG9jOjEwMTkzMDg0-overview#paging).'
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
    OAuth2Demo:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: 'https://sso-api-demo.apigateway.co/oauth2/auth'
          tokenUrl: 'https://sso-api-demo.apigateway.co/oauth2/token'
          scopes:
            sales.contact: Read-write access to sales contact details
            'business:read': Read only access to business details
            business: Read-write access to business details
            'partner:read': Read-write access to details about your partner
            financial: Read-write access to financial details
            order: Read-write access to order details
            'order:read': Read only access to order details
            'user.profile:read': Read access to the profile fields of all categories of users
            'user.contact:read': 'Read access to the contact info (email, phone, address) of all categories of users'
            'user.permission:read': 'Read access to the permission info (accessible locations, features and roles) of all categories of users'
            user.permission: 'Read-write access to the permission info (accessible locations, features and roles) of all categories of users'
            user.admin: Read-write access to manage all users
            user.list: '''Allows searching for users based on a set of filters. (ex: email, name, category, organization). Without this scope an exact user id is required.'
            self.user.admin: 'Allows editing the profile, contact info and profile image for the current user.'
            'self.user.contact:read': 'Read access to the contact info (email, phone, address) of the current user.'
            openid: Allows getting the user id of the current user
            profile: 'Readonly access to the user profile, including name, locale, and language preferences.'
            email: Allows readonly access to the email of the current user.
            phone: Allows readonly access to the phone numbers of the current user.
            address: Allows readonly access to the address of the current user.
            sales.account: Allows read-write access to account records
            sales.proposals: Allows read-write access to proposals
            product: Read access to the product details
            'automation:read': Read only access to automations
          refreshUrl: ''
    OAuth2Prod:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: 'https://sso-api-prod.apigateway.co/oauth2/auth'
          tokenUrl: 'https://sso-api-prod.apigateway.co/oauth2/token'
          scopes:
            sales.contact: Read-write access to sales contact details
            'business:read': Read only access to business details
            business: Read-write access to business details
            'partner:read': Read-write access to details about your partner
            financial: Read-write access to financial details
            'order:read': Read only access to order details
            order: Read-write access to order details
            'user.profile:read': Read access to the profile fields of all categories of users
            'user.contact:read': 'Read access to the contact info (email, phone, address) of all categories of users'
            'user.permission:read': 'Read access to the permission info (accessible locations, features and roles) of all categories of users'
            user.permission: 'Read-write access to the permission info (accessible locations, features and roles) of all categories of users'
            user.admin: Read-write access to manage all users
            user.list: '''Allows searching for users based on a set of filters. (ex: email, name, category, organization). Without this scope an exact user id is required.'
            self.user.admin: 'Allows editing the profile, contact info and profile image for the current user.'
            'self.user.contact:read': 'Read access to the contact info (email, phone, address) of the current user.'
            openid: Allows getting the user id of the current user
            profile: 'Readonly access to the user profile, including name, locale, and language preferences.'
            email: Allows readonly access to the email of the current user.
            phone: Allows readonly access to the phone numbers of the current user.
            address: Allows readonly access to the address of the current user.
            sales.account: Allows read-write access to account records
            sales.proposals: Allows read-write access to proposals
            product: Read access to the product details
            'automation:read': Read only access to automations
          refreshUrl: ''
  schemas:
    businessLocations:
      title: Business Location
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Any entity that works with a provider company (two-way communication). These generally have a sustained relationship with the provider company. This may include a potential buyer, an existing client, or a past client that has churned.
      x-tags:
        - Business Locations
      x-examples:
        Example Request:
          type: businessLocations
          attributes:
            customerIdentifier: string
            name: string
            address:
              line1: 109 8th Street E.
              line2: Suite 23
              city: string
              postalCode: S7M 1R3
              regionCode: CA-SK
              countryCode: CA
            phoneNumbers:
              - string
            serviceAreaBusiness: true
            geoCoordinate:
              latitude: -90
              longitude: -180
            hours:
              - hoursTypeId: general
                regularHours:
                  - openDay: wednesday
                    closeDay: wednesday
                    openTime: '09:00'
                    closeTime: '17:00'
                specialHours:
                  - status: open
                    startDate: '2019-08-24'
                    endDate: '2019-08-24'
                    startTime: '09:45'
                    endTime: '16:45'
            tollFreeNumber: string
            trackingNumbers:
              - string
            commonNames:
              - string
          relationships:
            businessPartner:
              data:
                type: partners
                id: ABC
            businessCategories:
              data:
                - type: businessCategories
                  id: 'active:diving:freediving'
      properties:
        id:
          type: string
          example: AG-1234567
        type:
          type: string
          default: businessLocations
          enum:
            - businessLocations
        attributes:
          type: object
          properties:
            customerIdentifier:
              type: string
              description: 'A value assigned by the business partner to reference this business location. Customer ID is currently NOT enforced to be unique, and there may be negative side effects to having a duplicate and/or changing a customer ID, specifically around legacy SSO. Use caution when editing a customer ID.'
            name:
              type: string
              description: |-
                The common name for this location.

                Note: The pipe character (`|`) is not allowed.
              pattern: '^[^|]+$'
              minLength: 1
            address:
              type: object
              properties:
                line1:
                  type: string
                  example: 109 8th Street E.
                  description: The primary information. Typically a street address.
                line2:
                  type: string
                  example: Suite 23
                  description: An additional line of information to add after the street address.
                city:
                  type: string
                stateCode:
                  type: string
                  maxLength: 2
                  minLength: 2
                  example: CA
                  deprecated: true
                  description: Deprecated - This field has been replaced by regionCode. The two letter state code within the country
                  x-lifecycle:
                    status: deprecated
                    deprecated: '2021-10-04'
                    proposedRemoval: '2021-11-04'
                    description: This field was replaced by regionCode while at the trusted tester phase. It will be removed shortly.
                zip:
                  type: string
                  deprecated: true
                  description: Deprecated - This field has been renamed postalCode
                  x-lifecycle:
                    status: deprecated
                    deprecated: '2021-10-04'
                    proposedRemoval: '2021-11-04'
                    description: This field was renamed to postalCode while at the trusted tester phase. It will be removed shortly.
                postalCode:
                  type: string
                  description: The zip code or postal code component of an address.
                  example: S7M 1R3
                regionCode:
                  type: string
                  description: |-
                    The code for the top level subdivision within the country (state/province). For more info see the [Addresses guide](https://developers.vendasta.com/platform/1ljuzmi2uboim-addresses)

                    Examples: CA-SK, US-FL, AG-08, AU-NSW
                  example: CA-SK
                  maxLength: 6
                  minLength: 4
                  pattern: '^[A-Z]{2}-[\w]{1,3}$'
                countryCode:
                  type: string
                  maxLength: 2
                  minLength: 2
                  example: CA
                  description: |-
                    The two letter country code. For more info see the [Addresses guide](https://developers.vendasta.com/platform/1ljuzmi2uboim-addresses)

                    Examples: CA, US, AU
                  pattern: '^[A-Z]{2}$'
            phoneNumbers:
              type: array
              description: |-
                The standard phone numbers for the location.
                Formatting characters may be included.

                **Extensions**

                It is recommended that extensions are included at the end of the number after an appropriate separator: Pause: `,` Wait: `;` Default: `ext.`

                You may test the parsibility of a number using https://phonenumbers.temba.io/ All phone numbers are assumed to be in the same country as this business location.
              maxItems: 3
              items:
                type: string
            serviceAreaBusiness:
              type: boolean
              description: When true the address will be used as the center of the area that this location services instead of being displayed.
            geoCoordinate:
              type: object
              description: |-
                The point where the map pin for the location should be displayed.

                The values will **not** be automatically updated when the address is updated. If not provided when creating the location they will be initialized based on the address.

                It is expressed as a pair of numbers to represent degrees latitude and degrees longitude in accordance with the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) standard (the one used by your GPS).
              required:
                - latitude
                - longitude
              properties:
                latitude:
                  type: number
                  minimum: -90
                  maximum: 90
                longitude:
                  type: number
                  minimum: -180
                  maximum: 180
            hours:
              $ref: '#/components/schemas/hoursOfOperation'
            updatedAt:
              type: string
              description: The time at which the business locations was last updated
            tollFreeNumber:
              type: string
              x-stoplight:
                id: osrb4z5e7kdm2
              description: The toll free number for the business.
            trackingNumbers:
              type: array
              x-stoplight:
                id: 4a4pt5e0kkxan
              description: A call tracking number is a phone number that gathers analytics for inbound calls. Call tracking is commonly used as a method of performance assessment for marketing campaigns.
              minItems: 0
              maxItems: 6
              items:
                x-stoplight:
                  id: p7k0otyb8h17q
                type: string
            commonNames:
              type: array
              x-stoplight:
                id: 4k2d33t7kl1hy
              maxItems: 3
              minItems: 0
              description: Other names that your business is commonly called (Ex. Patty's Irish Pub referred to as Patty's or Patty's Pub).
              items:
                x-stoplight:
                  id: t1gp8neeat4ym
                type: string
            primaryOperatingLanguage:
              type: string
              readOnly: true
              description: 'The primary language in which this business operates, as a BCP 47 language tag (e.g. "en", "it", "fr-CA"). Mirrored from the salesAccounts record; set it there to change it. Returns "en" when unset.'
              example: en
        relationships:
          type: object
          properties:
            businessPartner:
              type: object
              description: A link to the organization that provides the platform to this business location.
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      default: partners
                      enum:
                        - partners
                    id:
                      type: string
                      example: ABC
            businessCategories:
              type: object
              description: A list of the types of business this location should be compared against. The first item on the list will be considered as the primary category. If not set during creation it will default "other".
              properties:
                data:
                  type: array
                  maxItems: 3
                  minItems: 0
                  items:
                    type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        default: businessCategories
                        enum:
                          - businessCategories
                        example: businessCategories
                      id:
                        type: string
                        example: 'active:diving:freediving'
    partners:
      title: Partner
      type: object
      x-lifecycle:
        status: proposed
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Proposed`

        A partner is an organization that has a store filled with products that other organizations can purchase.

        Partners may fill one or more of the following roles:
        - **Business Partner**: Have a direct billing relationship with SMBs
        - **Vendor**: Integrate goods into the Vendasta platform to be sold by Business Partners to SMBs
        - **Service Provider**: Integrate services into the Vendasta platform that they will fulfill for SMBs

        Note: Small/Medium-Sized Businesses (SMBs) are represented by their primary Business Location record. They may only buy products through their Business Partner.
      properties:
        id:
          type: string
          minLength: 3
          maxLength: 4
        type:
          type: string
          enum:
            - partners
          readOnly: false
        attributes:
          type: object
          properties:
            name:
              type: string
              description: The public name for the organization
          required:
            - name
        relationships:
          type: object
          properties:
            parent:
              type: object
              description: 'The parent partner is the partner that this partner primarily purchases stuff from. '
              properties:
                data:
                  type: object
                  required:
                    - id
                    - type
                  properties:
                    id:
                      type: string
                      minLength: 3
                      maxLength: 4
                    type:
                      type: string
                      enum:
                        - parent
              required:
                - data
      required:
        - id
        - type
      x-tags:
        - Partners
      x-examples:
        example-1:
          data:
            id: ABC
            type: partners
            attributes:
              name: Mountain Media
            relationships:
              parent:
                data:
                  id: VMF
                  type: partners
    purchases:
      title: Purchase
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Purchases are a receipt of items sold to your organization. When selling to another organization you will want to create an Order instead.

        Purchases generated by the platform to record the wholesale fees that are charged to a partner for products they sell to their customers. One time fees and each renewal will appear as separate line items broken out per customer.

        All amounts will be specified in the minor unit of the purchase's currency. For example in the case of USD that would be cents. For more info on converting between minor and major units see [this wikipedia article](https://en.wikipedia.org/wiki/ISO_4217#Minor_units_of_currency).
      x-tags:
        - Purchases
      properties:
        id:
          type: string
          description: 'A platform generated identifier for the purchase '
        type:
          type: string
          enum:
            - purchases
          readOnly: false
        attributes:
          type: object
          properties:
            createdAt:
              description: The time at which the purchase was created
              format: date-time
              type: string
            statusCode:
              type: string
              default: draft
              enum:
                - draft
                - due
                - overdue
                - paid
                - uncollectible
              description: |-
                The payment status of the purchase will be one of the following:
                - `draft`:  Indicates the purchase is not closed yet. New line items can be added when the purchase is in this state.
                - `due`: The purchase has been finalized and is ready to be paid.
                - `overdue`: The purchase is unpaid and has past the due date
                - `paid`: The full amount has been paid.
                - `uncollectible`: After multiple failed attempts to collect payment it's unlikely that this purchase will be paid
              readOnly: true
            discountAmount:
              type: integer
              description: The sum of all price reductions applied to products
            taxAmount:
              type: integer
              description: The sum of all taxes applied to items of the purchase
            total:
              type: integer
              description: 'The total amount the purchase is for, accounting for any applied discounts or taxes'
            currencyCode:
              type: string
              minLength: 3
              maxLength: 3
              example: CAD
              description: 'The 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)'
            lineItems:
              type: array
              items:
                type: object
                properties:
                  sku:
                    type: string
                    description: The unique identifier of a product or service
                  customerId:
                    type: string
                    description: The ID of the organization that purchased the product
                  unitAmount:
                    description: The wholesale cost of the product before discounts or taxes are applied.
                    type: integer
                  discountAmount:
                    description: The total amount the cost of this product has been reduced by
                    type: integer
                  taxAmount:
                    description: The total amount of tax charged for this product
                    type: integer
                  total:
                    description: The final cost of the product accounting for any applied discounts or taxes
                    type: integer
        relationships:
          type: object
          properties:
            partner:
              type: object
              description: The partner that the purchase receipt is being sent to. They will be the one who purchased the product at a wholesale rate and activated it for one of their customers
              x-stoplight:
                id: 2l7icoo6qmoaw
              properties:
                data:
                  type: object
                  required:
                    - id
                    - type
                  properties:
                    id:
                      type: string
                      minLength: 3
                      maxLength: 4
                    type:
                      type: string
                      enum:
                        - partner
              required:
                - data
      required:
        - id
        - type
    orders:
      title: Order
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        An order records a sale to a business location. For example requests see the [Sales guide](/guides/sales/overview).
      x-tags:
        - Orders
      properties:
        id:
          type: string
          example: 'AG-1234:ORD-1234567'
          readOnly: true
        type:
          type: string
          default: orders
          enum:
            - orders
        attributes:
          type: object
          properties:
            currencyCode:
              type: string
              minLength: 3
              maxLength: 3
              example: CAD
              description: 'The 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)'
            lineItems:
              type: array
              items:
                $ref: '#/components/schemas/lineItem'
            statusCode:
              type: string
              default: processing
              enum:
                - draft
                - submitted
                - processing
                - declined
                - fulfilled
                - error
                - archived
                - NotReady
              description: |-
                The status of the order will be automatically set to one of the following by the system:
                - `draft`: The order has not yet been sent for approval
                - `submitted`: The order is ready for approval
                - `processing`: The order and its items are being processed
                - `declined`: The order has been declined by an admin or a customer
                - `fulfilled`: The order and its items have been successfully processed. This includes activating the products with the vendor(s).
                - `error`: One or more of the orders items failed to be processed
                - `archived`: The order has been marked as archived
                - `NotReady`: The order could not be created as a dependent resource is not yet ready to be used
            tags:
              type: array
              maxItems: 30
              description: A tag is a label that can be used for grouping and filtering your list of orders. They may be any string upto 30 characters in length.
              items:
                type: string
                maxLength: 30
                minLength: 1
            notes:
              type: string
              description: Free-text notes associated with the order.
        relationships:
          type: object
          properties:
            businessLocation:
              type: object
              description: 'Required during creation: The business location the order is for'
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - id
                    - type
                  properties:
                    id:
                      type: string
                      example: AG-1234567
                    type:
                      type: string
                      default: businessLocations
                      enum:
                        - businessLocations
            salesPerson:
              type: object
              description: |-
                The user who will be credited with the sale. Used to associate orders with salespersons in reports.

                Note the user must have the salesperson role.
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - id
                    - type
                  properties:
                    id:
                      type: string
                      example: U-1234567
                    type:
                      type: string
                      enum:
                        - users
                      default: users
    orderCustomFields:
      title: Order Custom Fields
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom fields associated with a sales order. The field definitions can be managed at Partner Center -> Administration -> Custom Fields.

        One form of identifier should be chosen, either `fieldId` or `externalId`.
        `fieldId` is the computer generated ID (like `FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99`) and `externalId` is a optional human-readable ID that can be set in the administration panel.

        Dropdown possible value and the currency code are also configured in the Administration panel.
      x-examples:
        Custom Fields with string value Example:
          data:
            id: 'AG-1231231:ORD-1234567'
            type: orderCustomFields
            partnerFields:
              - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                stringValue: A good string value
                title: Title of abc448ca field
                description: Description for abc448ca field
                fieldType: string
        Custom Fields with integer value Example:
          data:
            id: 'AG-1231231:ORD-1234567'
            type: orderCustomFields
            partnerFields:
              - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                integerValue: 1000
                title: Title of 123448ca field
                description: Description for 123448ca field
                fieldType: integer
        Custom Fields with Date value Example:
          data:
            id: 'AG-1231231:ORD-1234567'
            type: orderCustomFields
            partnerFields:
              - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                dateValue: '2016-01-02T15:04:05Z'
                title: Title of 987448ca field
                description: Description for 987448ca field
                fieldType: date
        Custom Fields Full:
          data:
            id: 'AG-1231231:ORD-1234567'
            type: orderCustomFields
            partnerFields:
              - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                stringValue: A good string value
                title: Title of abc448ca field
                description: Description for abc448ca field
                fieldType: string
              - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                integerValue: 1000
                title: Title of 123448ca field
                description: Description for 123448ca field
                fieldType: integer
              - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                dateValue: '2022-01-02T15:04:05Z'
                title: Title of 987448ca field
                description: Description for 987448ca field
                fieldType: date
              - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00
                dropdownValue: red
                title: Title of 987448f2 field
                description: Description for 987448f2 field
                fieldType: dropdown
              - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01
                currencyValue: 10000
                title: Title of 98744854 field
                description: Description for 98744854 field
                fieldType: currency
                currencyCode: CAD
        Custom Fields with Dropdown Example:
          data:
            id: 'AG-1231231:ORD-1234567'
            type: orderCustomFields
            partnerFields:
              - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00
                dropdownValue: red
                title: Title of 987448f2 field
                description: Description for 987448f2 field
                fieldType: dropdown
        Custom Fields with Currency Example:
          data:
            id: 'AG-1231231:ORD-1234567'
            type: orderCustomFields
            partnerFields:
              - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01
                currencyValue: 10000
                title: Title of 98744854 field
                description: Description for 98744854 field
                fieldType: currency
                currencyCode: CAD
      x-tags:
        - Order Custom Fields
      properties:
        id:
          type: string
          example: 'AG-1231231:ORD-1234567'
          description: 'An identifier for the parent entity, for example order (AG-1231231:ORD-12345671)'
          readOnly: true
        type:
          type: string
          default: orderCustomFields
          enum:
            - orderCustomFields
          description: Should always be orderCustomFields
        attributes:
          type: object
          properties:
            partnerFields:
              type: array
              description: |-
                List of custom fields specific to the partner with a direct relationship to the sales order.
                To send a new value each field must have at least the fieldId and its correspondent value.
                For example a field of type string must have the stringValue attribute filled.

                string -> stringValue

                integer -> integerValue

                date -> dateValue

                Only the fields that you wish to modify need to be sent.
              items:
                type: object
                properties:
                  fieldId:
                    type: string
                    description: 'Field identifier, can be retrieved by listing the attributes'
                  externalId:
                    type: string
                    description: 'Alternative field identifier, can be set on admin panel and can be retrieved by listing the attributes'
                  fieldType:
                    type: string
                    example: string
                    enum:
                      - string
                      - integer
                      - date
                      - dropdown
                      - currency
                    description: |-
                      Indicates which of the value fields to use to read or write the data. It can only be modified from within partner center. 

                      string -> stringValue

                      integer -> integerValue

                      date -> dateValue

                      dropdown -> dropdownValue

                      currency -> currencyValue
                    readOnly: true
                  stringValue:
                    type: string
                    description: Required when the field type is `string`
                  integerValue:
                    type: integer
                    description: Required when the field type is `integer`
                  dateValue:
                    type: string
                    description: Required when the field type is `date`
                    format: date
                  dropdownValue:
                    type: string
                    description: Required when type is `dropdown`. The possible values can be discovered using the administration panel.
                  currencyValue:
                    type: integer
                    description: |-
                      Required when the field type is `currency`.

                      This field represents the cents (or the smallest part of the currency).

                      Example:
                      USD 600.00 -> currencyValue=60000
                  currencyCode:
                    type: string
                    minLength: 3
                    maxLength: 3
                    description: |-
                      Represents the type of currency when the field is type `currency`. It will be the 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)

                      Ex: USD, CAD, AUD
                    example: USD
                    readOnly: true
                  title:
                    type: string
                    description: 'The main label for the field, appearing in most user interfaces that show the value. This field is not read when setting a value.'
                    readOnly: true
                  description:
                    type: string
                    description: 'A longer text explanation of the field, it optionally appears in the UI. This field is not read when setting a value.'
                    readOnly: true
      required:
        - id
        - type
    orderForm:
      title: Order Form
      type: object
      description: |-
        A group of form fields associated with an order. The `id` identifies the form:
        - `standard`: Vendasta shared fields (business name, address, etc.)
        - `admin`: Partner/market admin-configured default fields
        - `order:<app-id>`: App-specific order form fields
        - `order:<app-id>:<addon-id>`: Addon-specific order form fields
      properties:
        id:
          type: string
          description: 'Identifies which form this group belongs to. For example: `standard`, `admin`, `order:MP-abc`, or `order:MP-abc:addon-123`.'
          example: 'order:MP-abc'
        fields:
          type: array
          items:
            $ref: '#/components/schemas/orderFormField'
      required:
        - id
        - fields
    orderFormField:
      title: Order Form Field
      type: object
      description: A single field within an order form.
      properties:
        id:
          type: string
          description: The unique identifier of the field within its form.
          example: business_name
        value:
          type: string
          description: |-
            The answer or value for this field.

            For `file` fields, provide a plain URL string pointing to any publicly accessible file. The filename will be derived from the URL path. To use Vendasta-hosted file storage, first upload the file to `https://order-fulfillment-api-prod.apigateway.co/fulfillment-form/attachments/upload` and use the returned URL as the value.
          example: Acme Corp
        label:
          type: string
          readOnly: true
          description: Human-readable label for the field. Read-only; returned on GET but ignored on create/update.
        description:
          type: string
          readOnly: true
          description: Description or help text for the field. Read-only.
        type:
          type: string
          description: 'The input type of the field. Required when creating or updating order forms.'
          enum:
            - text
            - textarea
            - dropdown
            - checkbox
            - file
            - vbcUser
      required:
        - id
        - value
    orderFulfillmentForms:
      title: Order Fulfillment Form
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        A fulfillment form submission for an app within an order. Fulfillment forms are filled out after order creation to provide the vendor with information needed to fulfill the order.
        The ID is a composite of `businessId:orderId:appId`.

        **Workflow:** Use PATCH to save form field data as a draft, then POST to `/actions/submit` to explicitly submit the form to the vendor. The `status` field is read-only and reflects the vendor-side workflow state.

        **Limitation:** If an order contains multiple instances of the same add-on app, only a single set of form answers is stored per app ID. Per-instance form answers are not currently supported.
      properties:
        id:
          type: string
          example: 'AG-1234:ORD-1234567:MP-abc'
          readOnly: true
        type:
          type: string
          default: orderFulfillmentForms
          enum:
            - orderFulfillmentForms
        attributes:
          type: object
          properties:
            appId:
              type: string
              readOnly: true
              description: The app ID this fulfillment form belongs to.
              example: MP-abc
            status:
              type: string
              readOnly: true
              description: |-
                The current fulfillment order status. This field is read-only and reflects the vendor-side workflow state.

                - `detailsNeeded` — The vendor is waiting for the partner to provide form details.
                - `inReview` — The form has been submitted and is awaiting vendor review.
                - `inProgress` — The vendor is actively fulfilling the order.
                - `completed` — Fulfillment is complete.
                - `cancelled` — The fulfillment order was cancelled.
                - `onHold` — The fulfillment order is on hold.

                To submit a form (transitioning status to `inReview`), use the `/orderFulfillmentForms/{id}/actions/submit` endpoint.
              enum:
                - detailsNeeded
                - inReview
                - inProgress
                - completed
                - cancelled
                - onHold
              example: detailsNeeded
            fields:
              type: array
              description: The form fields and their submitted values.
              items:
                $ref: '#/components/schemas/orderFormField'
    businessCategories:
      title: Business Category
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        The taxonomy to be applied to business locations indicating the type of services that they provide.
      x-tags:
        - Business Categories
      properties:
        id:
          type: string
          example: AG-1234567
          readOnly: true
        type:
          type: string
          default: businessCategories
          enum:
            - businessCategories
          readOnly: true
        attributes:
          type: object
          properties:
            name:
              type: string
              description: A user friendly description for the category. It will have been translated based on the Accept-Language header.
              readOnly: true
            isActive:
              type: boolean
              description: Whether the category is active. Inactive categories may still be returned when looking up by ID but should not be used for new assignments.
              readOnly: true
    countries:
      title: Country
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        A country that is valid for use with the API
      x-tags:
        - Countries
      properties:
        id:
          type: string
          example: CA
          readOnly: true
        type:
          type: string
          default: countries
          enum:
            - countries
          readOnly: true
        attributes:
          type: object
          properties:
            name:
              type: string
              description: A user friendly description for the Country.
              readOnly: true
    countryRegions:
      title: Country Region
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        A country region that is valid for use with the API
      x-tags:
        - Countries
      properties:
        id:
          type: string
          example: CA-SK
          readOnly: true
        type:
          type: string
          default: countryRegions
          enum:
            - countryRegions
          example: countryRegions
          readOnly: true
        attributes:
          type: object
          properties:
            name:
              type: string
              description: A user friendly description for the Country region.
              readOnly: true
        relationships:
          type: object
          properties:
            country:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                      example: countries
                      enum:
                        - countries
    users:
      title: Users
      type: object
      x-lifecycle:
        status: proposed
      description: "[Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Proposed`\n\t\nA “user” is a person or bot that could potentially interact with the platform. If they have not been granted access to any features they will not be able to do anything after logging in.\n\nA person who is the customer of multiple businesses may have multiple separate user records within the platform so it is important to always include an organization filter when searching by email or name. \n\nTo learn more and view sample requests visit the [user management guide](/guides/crm/users)"
      x-tags:
        - Users
      properties:
        type:
          type: string
          default: users
          enum:
            - users
        id:
          type: string
          description: |-
            The id will be assigned by the server and must be included on all update requests. Values sent during creation will be ignored. It is globally unique across all platform instances and will not change.

            You may use the special id `me` to operate on the current user if you have the scope `openid`.
          example: U-3ca38c57-7677-45d4-81e8-cd29eab91d63
        attributes:
          type: object
          nullable: true
          properties:
            displayName:
              type: string
              example: Bill Smith
              description: The user’s name formatted for display. This will always have a value.
              readOnly: true
            givenName:
              type: string
              description: 'Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.'
              minLength: 0
              maxLength: 50
              example: William
            familyName:
              type: string
              description: 'Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.'
              minLength: 0
              maxLength: 50
              example: Smith
            greetingName:
              type: string
              description: The name to use at the opening of messages addressed to the user. Note that in some cultures this is an alternate spelling or shortened form of the first name. Defaults to givenName.
              minLength: 0
              maxLength: 50
              example: Billy
            email:
              type: string
              format: email
              example: bill@example.com
              minLength: 5
              description: |-
                The primary email address for the user.
                This is required when creating a user.
            emailVerified:
              type: boolean
              default: false
              description: 'True if the End-User''s e-mail address has been verified; otherwise false. When true affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. '
              readOnly: true
            emailSet:
              type: boolean
              description: Indicates there is an email address available that can have messages sent to it using the notifications system.
              readOnly: true
            languageLocaleCode:
              type: string
              pattern: '^[a-z]{2}-[A-Z]{2}$'
              example: en-US
              description: |-
                The local language that content should be displayed to this user in.

                Note: We currently have a limited set of allowed languages but expect to support many more in the future. When the requested language is not supported US English will be used.

                It should be a single BCP47/RFC5646 language tag. This is an [ISO 639-1 Alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code in lowercase and an [ISO 3166-1 Alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) country code in uppercase, separated by a dash.

                Examples:
                - `en-US` English (US)
                - `fr-FR` French (France)
                - `cs-Cz` Czech (Czech Republic)
                - `de-DE` German (Germany)
                - `nl-BE` Dutch (Belgium)
            phoneNumbersSet:
              type: boolean
            phoneNumbers:
              type: array
              minItems: 0
              description: |-
                A list of phone numbers for the user. 

                Note: Do not send a phone number object or 
                 type if the user does not have a phone number.
              items:
                type: object
                properties:
                  number:
                    type: string
                    description: |-
                      The standard phone numbers for the location.
                      Formatting characters may be included.

                      **Extensions**

                      It is recommended that extensions are included at the end of the number after an appropriate separator: Pause: `,` Wait: `;` Default: `ext.`

                      You may test the parsibility of a number using https://phonenumbers.temba.io/

                      All partial phone numbers are assumed to be in the same country as this user's address.
                    example: +1-306-555-1234 ext. 56
                  typeCode:
                    type: string
                    description: |-
                      A classification of what the number should be used for.

                      The mobile number should be preferred when sending SMS messages to the user however they may also be sent to work or home numbers.
                    enum:
                      - mobile
                      - work
                      - home
                      - fax
                      - pager
                required:
                  - number
                  - typeCode
            address:
              type: object
              description: The primary address where this user can be reached.
              properties:
                line1:
                  type: string
                  example: 109 8th Street E.
                  description: The primary information. Typically a street address.
                line2:
                  type: string
                  example: Suite 23
                  description: An additional line of information to add after the street address.
                streetAddress:
                  type: string
                  example: 109 8th Street E.
                  deprecated: true
                  description: Deprecated - This field has been renamed line1
                  x-lifecycle:
                    status: deprecated
                    deprecated: '2021-10-04'
                    proposedRemoval: '2021-11-04'
                    description: This field was renamed to line1 while at the trusted tester phase. It will be removed shortly.
                additionalAddress:
                  type: string
                  example: Suite 23
                  deprecated: true
                  description: Deprecated - This field has been renamed line2. An additional line of information to add after the street address.
                  x-lifecycle:
                    status: deprecated
                    deprecated: '2021-10-04'
                    proposedRemoval: '2021-11-04'
                    description: This field was renamed to line2 while at the trusted tester phase. It will be removed shortly.
                city:
                  type: string
                  description: 'The city, town or locality component of an address.'
                  example: Saskatoon
                postalCode:
                  type: string
                  description: The zip code or postal code component of an address.
                  example: S7M 1R3
                regionCode:
                  type: string
                  description: |-
                    The code for the top level subdivision within the country (state/province). For more info see the [Addresses guide](https://developers.vendasta.com/platform/1ljuzmi2uboim-addresses)

                    Examples: CA-SK, US-FL, AG-08, AU-NSW
                  example: CA-SK
                  maxLength: 6
                  minLength: 4
                  pattern: '^[A-Z]{2}-[\w]{1,3}$'
                countryCode:
                  type: string
                  maxLength: 2
                  minLength: 2
                  example: CA
                  description: |-
                    The two letter country code. For more info see the [Addresses guide](https://developers.vendasta.com/platform/1ljuzmi2uboim-addresses)

                    Examples: CA, US, AU
                  pattern: '^[A-Z]{2}$'
            profileImage:
              type: string
              format: uri
              description: A photo that can be used to represent this user. If the user does not have a custom image set a default image will be returned.
              example: 'https://storage.googleapis.com/wordpress-www-vendasta/vw-wordpress/Brendan-King-1.jpg'
              readOnly: true
            timeZone:
              type: string
              description: |-
                The User's time zone in the IANA [time zone database format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

                Example: `America/Los_Angeles`
              example: America/Regina
            createdAt:
              type: string
              format: date-time
              description: The time at which the user was initially created in the platform.
              readOnly: true
            updatedAt:
              type: string
              format: date-time
              description: 'The time at which the user’s profile was last updated. Note: Changes to permissions will not affect this field.'
              readOnly: true
        relationships:
          type: object
          properties:
            partner:
              type: object
              description: A link to the organization that provides the platform to this user.
              properties:
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      default: partners
                      enum:
                        - partners
                    id:
                      type: string
                      example: ABC
              required:
                - data
            businessLocations:
              type: object
              description: |-
                The business locations that this user is a member of.

                When a new location is added to a user they will be granted the default business user permissions.

                Fine grained permissions currently must be managed in Partner Center's UI. We are gathering interest to determine how it should work by API so please send us your use cases.
              properties:
                data:
                  type: array
                  items:
                    type: object
                    additionalProperties: false
                    properties:
                      type:
                        type: string
                        default: businessLocations
                        example: businessLocations
                        enum:
                          - businessLocations
                      id:
                        type: string
                        example: AG-1234567
                        description: The ID of a previously created business location record.
                    required:
                      - type
                      - id
            platformAccess:
              type: object
              description: |-
                `Proposed` The platform access functionality is still at a `proposed` status. Not all options are currently available.

                Use this field to grant access to platform level features to your employees and contractors.
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        default: appFeatures
                        example: appFeatures
                      id:
                        type: string
                        enum:
                          - 'pc:access'
                          - 'pc:canCustomizeWhitelabel'
                          - 'pc:canAccessBilling'
                          - 'pc:canManageSales'
                          - 'pc:canManageAccounts'
                          - 'pc:canManageTasks'
                          - 'pc:canAccessBrands'
                          - 'pc:canAccessMarketing'
                          - 'pc:canAccessDashboard'
                          - 'pc:canAccessOrders'
                          - 'pc:canManageAdmins'
                          - 'pc:canAccessMarketplace'
                          - 'pc:canEnableApps'
                          - 'pc:canAccessCompanyProfile'
                          - 'pc:canAccessAutomations'
                          - 'ssc:access'
                          - 'ssc:manage'
                          - 'tm:access'
                          - 'tm:manage'
                        description: 'The platform access functionality is still at a `proposed` status. Not all options are currently available. '
                    required:
                      - type
                      - id
    automationRuns:
      title: Automation Run
      type: object
      x-examples: {}
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        An Automation run is the instance of an automation executing its steps for a business location.
        You may configure the automation definition and obtain its ID within Partner Center.
      x-tags:
        - Automation Runs
      required:
        - type
        - relationships
      properties:
        type:
          type: string
          default: automationRuns
          example: automationRuns
          enum:
            - automationRuns
        relationships:
          type: object
          required:
            - automation
          properties:
            automation:
              type: object
              description: 'A link to the automation definition that is being run. '
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      default: automations
                      example: automations
                    id:
                      type: string
                      example: Automation-91cb048c-c498-43ba-ab99-2ca2d27d2c46
                      pattern: ^Automation-
            businessLocation:
              type: object
              description: |-
                Deprecated: Pass the businessLocation.id in the attributes.entityId field instead.

                A link to the business location that this automation is being run for. Either the businessLocation or order is required. (It depends on the automation type.)
              deprecated: true
              properties:
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      default: businessLocations
                      example: businessLocations
                    id:
                      type: string
                      example: AG-1234567
            order:
              type: object
              description: |-
                Deprecated: Pass the order.id in the attributes.entityId field instead.

                A link to the order that this automation is being run for. Either the businessLocation or order is required. (It depends on the automation type.)
              deprecated: true
              properties:
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      enum:
                        - orders
                      default: orders
                    id:
                      type: string
                      example: 'AG-1234:ORD-1234567'
        attributes:
          type: object
          properties:
            entityId:
              type: string
              description: |
                The ID of the primary record that this automation relates to. It is used for reporting and rate limiting.

                For automations using the `Triggered manually for a contact` trigger it should contain a contact id. 

                For automations using the `Triggered manually for a order` trigger it should contain an order id. 

                For automations using the `A webhook is received` trigger it may be left blank.
            data:
              type: object
              description: Extra data that you would like to send to the automation. The automation trigger must also be configured correctly to be able to read these values.
    automations:
      title: Automation
      type: object
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        An Automation is a trigger and set of actions performed when the trigger is activated.
      x-tags:
        - Automations
      x-examples: {}
      properties:
        type:
          type: string
          default: automations
          enum:
            - automations
          example: automations
          readOnly: true
        id:
          type: string
          example: Automation-91cb048c-c498-43ba-ab99-2ca2d27d2c46
          pattern: ^Automation-
        attributes:
          type: object
          properties:
            name:
              type: string
              example: Example Automation
              description: The name of the automation
              readOnly: true
            trigger:
              type: string
              description: The triggering action for the automation
              enum:
                - TaskDefinition-manual-api-order-trigger
                - TaskDefinition-manual-api-account-trigger
              example: TaskDefinition-manual-account-trigger
            status:
              type: string
              description: 'The current status of the automation, one of: on, off, draining'
              example: 'on'
              enum:
                - 'on'
                - draining
                - 'off'
              readOnly: true
            tags:
              type: array
              description: A list of user-defined tags on the automation
              items:
                type: string
                example: example-tag
              readOnly: true
            customParameters:
              type: array
              readOnly: true
              x-stoplight:
                id: 5t9ro1pimpdz3
              items:
                x-stoplight:
                  id: t4wymxwy7lems
                type: object
                properties:
                  type:
                    type: string
                    readOnly: true
                    x-stoplight:
                      id: 1w0n4zmhr05mg
                    enum:
                      - string
                      - boolean
                    description: Data type of the parameter
                  id:
                    type: string
                    readOnly: true
                    x-stoplight:
                      id: uz2kmvow8sewq
                  name:
                    type: string
                    readOnly: true
                    x-stoplight:
                      id: t4qas99egphxz
      required:
        - type
        - id
    salesAccounts:
      title: Sales Account
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        A Sales Account is used by partners to track their interactions with a Business Location. It contains the public data of a business location plus additional data which is private to the partner.
      x-tags:
        - Sales Accounts
      x-examples:
        Sales Account Example:
          data:
            id: AG-1234567
            type: salesAccounts
            attributes:
              tags:
                - tag1
                - tag2
              customerIdentifier: User-defined-id-123123
              name: Company Example
              address:
                line1: 109 8th Street E.
                line2: Suite 23
                city: Saskatoon
                postalCode: S7M 1R3
                regionCode: CA-SK
                countryCode: CA
              phoneNumbers:
                - '+13068800001'
              serviceAreaBusiness: true
              geoCoordinate:
                latitude: -90
                longitude: -180
            relationships:
              salesPeople:
                data:
                  - id: U-123123-123123
                    type: users
              customFields:
                data:
                  - id: AG-1234567
                    type: customFields
              businessPartner:
                data:
                  type: partners
                  id: ABC
              businessCategories:
                data:
                  - type: businessCategories
                    id: 'active:diving:freediving'
              type: salesAccounts
            included:
              - id: AG-1231231
                type: salesAccountCustomFields
                partnerFields:
                  - fieldId: FieldID-1231231-12312312
                    stringValue: Text value
                    title: Title of field FieldID-1231231
                    description: Description of field FieldID-1231231
                    fieldType: string
      properties:
        id:
          type: string
          example: AG-1234567
        type:
          type: string
          default: salesAccounts
          enum:
            - salesAccounts
        attributes:
          type: object
          properties:
            tags:
              type: array
              maxItems: 15
              description: A tag is a label that can be used for grouping and filtering your list of accounts. They may be any string upto 30 characters in length. There is a limit of 15 tags.
              items:
                type: string
                maxLength: 30
                minLength: 1
            customerIdentifier:
              type: string
              description: 'A value assigned by the business partner to reference this business location. Customer ID is currently NOT enforced to be unique, and there may be negative side effects to having a duplicate and/or changing a customer ID, specifically around legacy SSO. Use caution when editing a customer ID.'
            name:
              type: string
              description: |-
                The common name for this location.

                Note: The pipe character (`|`) is not allowed.
              example: CN Tower
              pattern: '^[^|]+$'
              minLength: 1
            commonNames:
              type: array
              description: A common name for a business (Something it is often referred to as)
              maxItems: 3
              minItems: 0
              items:
                type: string
            address:
              type: object
              properties:
                line1:
                  type: string
                  example: 290 Bremner Blvd
                  description: The primary information. Typically a street address.
                line2:
                  type: string
                  description: An additional line of information to add after the street address.
                city:
                  type: string
                  example: Toronto
                postalCode:
                  type: string
                  description: The zip code or postal code component of an address.
                  example: M5V 3L9
                regionCode:
                  type: string
                  description: |-
                    The code for the top level subdivision within the country (state/province). For more info see the [Addresses guide](https://developers.vendasta.com/platform/1ljuzmi2uboim-addresses)

                    Examples: CA-SK, US-FL, AG-08, AU-NSW
                  example: CA-ON
                  maxLength: 6
                  minLength: 4
                  pattern: '^[A-Z]{2}-[\w]{1,3}$'
                countryCode:
                  type: string
                  maxLength: 2
                  minLength: 2
                  example: CA
                  description: |-
                    The two letter country code. For more info see the [Addresses guide](https://developers.vendasta.com/platform/1ljuzmi2uboim-addresses)

                    Examples: CA, US, AU
                  pattern: '^[A-Z]{2}$'
            phoneNumbers:
              type: array
              description: |-
                The standard phone numbers for the location.
                Formatting characters may be included.

                **Extensions**

                It is recommended that extensions are included at the end of the number after an appropriate separator: Pause: `,` Wait: `;` Default: `ext.`

                You may test the parsibility of a number using https://phonenumbers.temba.io/ All phone numbers are assumed to be in the same country as this business location.
              maxItems: 3
              items:
                type: string
                example: '+14168686937'
            serviceAreaBusiness:
              type: boolean
              description: When true the address will be used as the center of the area that this location services instead of being displayed.
            geoCoordinate:
              type: object
              description: |-
                The point where the map pin for the location should be displayed.

                The values will **not** be automatically updated when the address is updated. If not provided when creating the location they will be initialized based on the address.

                It is expressed as a pair of numbers to represent degrees latitude and degrees longitude in accordance with the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) standard (the one used by your GPS).
              required:
                - latitude
                - longitude
              properties:
                latitude:
                  type: number
                  minimum: -90
                  maximum: 90
                  example: 43.6425662
                longitude:
                  type: number
                  minimum: -180
                  maximum: 180
                  example: -79.3870568
            seoKeywords:
              type: array
              minItems: 0
              maxItems: 3
              description: Deprecated - SEO keywords must be set in the Local SEO product
              deprecated: true
              x-lifecycle:
                status: deprecated
                deprecated: '2024-02-26'
                proposedRemoval: '2024-03-11'
                description: These SEO keywords were migrated and removed from the account group in favor of the Local SEO product's keywords. This field will be removed shortly.
              items:
                type: string
            website:
              type: string
              format: uri
              description: 'The primary website for this business location. http:// will be automatically added if no schema is provided.'
              example: 'https://www.vendasta.com'
            servicesOffered:
              type: array
              maxItems: 15
              minItems: 0
              description: |-
                The primary services that the business offers. For example personal tax filing, business tax filing. 

                Total length of services offered must be less than 256 characters, when joined with commas. Maximum instances: 15
              items:
                type: string
                example: root canals
            descriptionShort:
              type: string
              maxLength: 200
              description: A public summary of the business. See also `descriptionLong`
            descriptionLong:
              type: string
              maxLength: 750
              description: A public summary of the business. See also `descriptionShort`
            hours:
              $ref: '#/components/schemas/hoursOfOperation'
            updatedAt:
              type: string
              description: The time at which the sales accounts was last updated
            tollFreeNumber:
              type: string
              x-stoplight:
                id: eke0wqk8yvgmh
              description: The toll free number for the business.
            trackingNumbers:
              type: array
              x-stoplight:
                id: eyhgi2yh7ukaf
              minItems: 0
              maxItems: 6
              description: A call tracking number is a phone number that gathers analytics for inbound calls. Call tracking is commonly used as a method of performance assessment for marketing campaigns.
              items:
                x-stoplight:
                  id: yflmky9gif6ro
                type: string
            adminNotes:
              type: string
              x-stoplight:
                id: tnzahuoq5fsyi
              description: Administration notes for the account.
            primaryOperatingLanguage:
              type: string
              description: 'The primary language in which this business operates, as a BCP 47 language tag (e.g. "en", "it", "fr-CA"). Returns "en" when unset. On write, an empty or omitted value is ignored (it will not clear an existing value set via Business Profile).'
              example: en
            socialUrls:
              type: object
              x-stoplight:
                id: 8bta15bsc842h
              description: The Social URLs for a Sales Account.
              properties:
                googleplusUrl:
                  type: string
                  x-stoplight:
                    id: ojx06t4cb7thm
                  format: uri
                  description: The URL for a Sales Account's Google Plus page.
                linkedinUrl:
                  type: string
                  x-stoplight:
                    id: co78ugcn9hlc0
                  format: uri
                  description: The URL for a Sales Account's LinkedIn page.
                foursquareUrl:
                  type: string
                  x-stoplight:
                    id: tsw7lpw0p4neo
                  format: uri
                  description: The URL for a Sales Account's Foursquare page.
                xUrl:
                  type: string
                  x-stoplight:
                    id: gxqxvm2m72hqu
                  format: uri
                  description: The URL for a Sales Account's X page (formerly known as Twitter).
                facebookUrl:
                  type: string
                  x-stoplight:
                    id: ndrao4lgjf1na
                  format: uri
                  description: The URL for a Sales Account's Facebook page.
                youtubeUrl:
                  type: string
                  x-stoplight:
                    id: gyunfxlgc2hxe
                  format: uri
                  description: The URL for a Sales Account's Youtube page.
                instagramUrl:
                  type: string
                  x-stoplight:
                    id: oyxvkk0l76fg8
                  format: uri
                  description: The URL for a Sales Account's Instagram page.
                pinterestUrl:
                  type: string
                  x-stoplight:
                    id: 78zh69oa0k7s4
                  format: uri
                  description: The URL for a Sales Account's Pinterest page.
        relationships:
          type: object
          properties:
            salesPeople:
              type: object
              description: A list of the sales people assigned to this account. The first sales person in the list will be treated as the primary sales person and given special treatment.
              required:
                - data
              properties:
                data:
                  type: array
                  uniqueItems: true
                  items:
                    type: object
                    required:
                      - id
                      - type
                    properties:
                      id:
                        type: string
                        pattern: ^U-
                        description: |-
                          The user id of a salesperson. 

                          TestSalesAccountCustomFields_update/platform/users?filter[partner.id]=TEST&filter[email]=user@example.com`.

                          For more information access [GET /platform/users](/api-reference/legacy/platform/get-users)
                      type:
                        type: string
                        example: users
                        default: users
            customFields:
              type: object
              description: Custom Fields relative to a sales account
              required:
                - data
              properties:
                data:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - type
                    properties:
                      id:
                        type: string
                        description: 'ID of custom fields, can be retrieved using custom fields endpoint'
                      type:
                        type: string
                        example: customFields
                        default: customFields
            businessPartner:
              type: object
              description: A link to the organization that provides the platform to this business location.
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      default: partners
                      enum:
                        - partners
                    id:
                      type: string
                      example: ABC
            businessCategories:
              type: object
              description: A list of the types of business this location should be compared against. The first item on the list will be considered as the primary category. If not set during creation it will default "other".
              properties:
                data:
                  type: array
                  maxItems: 3
                  minItems: 0
                  items:
                    type: object
                    required:
                      - type
                      - id
                    properties:
                      type:
                        type: string
                        default: businessCategories
                        enum:
                          - businessCategories
                        example: businessCategories
                      id:
                        type: string
                        example: athletic_club
            businessMarket:
              type: object
              x-stoplight:
                id: lgzfm7ltbzrwf
              description: A link to the market within an organization that this business location belongs to.
              properties:
                data:
                  type: object
                  x-stoplight:
                    id: 7ec68r6p3snic
                  properties:
                    type:
                      x-stoplight:
                        id: f8x1v0dsz1h34
                      enum:
                        - salesAccountMarket
                    id:
                      type: string
                      x-stoplight:
                        id: k5qv6n4dx1wxh
        included:
          type: array
          description: During Get and List operations you may request the related resources be included by using the `include` query parameter. This can save you making an additional network request.
          items:
            anyOf:
              - $ref: '#/components/schemas/salesAccountCustomFields'
              - $ref: '#/components/schemas/users'
              - $ref: '#/components/schemas/businessCategories'
          readOnly: true
    subscriptions:
      type: object
      description: 'Subscriptions represent a product, product edition or service that will be billed for on the defined recurrence period.'
      title: Subscriptions
      x-stoplight:
        id: 04c49c2676b04
      x-tags:
        - Subscriptions
      properties:
        id:
          type: string
          description: The order id which is unique to a specific product subscription.
          example: Of-60341002-c558-484c-a7fe-e1vr97eadbg3
        type:
          type: string
          description: Type of the data that is returned.
          default: subscriptions
        attributes:
          type: object
          properties:
            customerId:
              type: string
              description: The id of the business location.
              example: AG-1234567
            productName:
              type: string
              description: The name of the product that the subscription is assigned for.
              example: Website Pro
            sku:
              type: string
              description: 'The unique identifier of a product, product edition or package. It can be obtained by following [this guide](/guides/sales/find-sku). This value is used when placing an order.'
              example: A-H73ELH2OP6
            customerName:
              type: string
              description: The name of the customer (Business).
              example: Kurry Cart
            billingStart:
              type: string
              description: The date/time when the item starts billing.
            frequency:
              type: string
              description: The frequency for which the product is billed.
              example: monthly
            nextRenewal:
              type: string
              description: The calculated next renewal date of the item.
    subscriptionAssignment:
      type: object
      description: 'A SubscriptionAssignment is an allocation of a single Subscription unit. The way a subscription unit is allocated depends on the Product or Service represented by the Subscription. A common case is that Subscription Units are assigned to Locations. In that case, the SubscriptionAssignment stores the link between a purchased Subscription and the Location it was allocated to.'
      x-tags:
        - Subscription Assignments
      title: Subscription Assignments
      properties:
        id:
          type: string
          description: |-
            The id is a string which is in the form - 
            businessLocationId : productId : activationId
          example: 'AG-1234:MP-12345:vb99d662-e12f-4r1c-g275-449aa19td438'
        type:
          type: string
          default: subscriptionAssignment
          enum:
            - subscriptionAssignment
          description: Should always be subscriptionAssignment
        attributes:
          type: object
          properties:
            sku:
              type: string
              description: 'The unique identifier of a product, product edition or package. It can be obtained by following [this guide](/guides/sales/find-sku). This value is used when placing an order.'
            productId:
              type: string
              description: The Application ID associated with this subscription
            editionId:
              type: string
              description: The Application Edition ID associated with this subscription (if applicable)
            status:
              type: string
              description: The status of the Assignment. Both `assigned` and `pendingUnassignment` mean it is currently assigned.
              enum:
                - assigned
                - pendingUnassignment
                - pendingAssignment
    salesAccountCustomFields:
      title: Sales Accounts Custom Fields
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom fields associated with a sales account. The field definitions can be managed at Partner Center -> Administration -> Custom Fields.

        One form of identifier should be chosen, either `fieldId` or `externalId`.
        `fieldId` is the computer generated ID (like `FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99`) and `externalId` is a optional human-readable ID that can be set in the administration panel.

        Dropdown possible value and the currency code are also configured in the Administration panel.
      x-examples:
        Custom Fields with string value Example:
          data:
            id: AG-1231231
            type: salesAccountCustomFields
            partnerFields:
              - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                stringValue: A good string value
                title: Title of abc448ca field
                description: Description for abc448ca field
                fieldType: string
        Custom Fields with integer value Example:
          data:
            id: AG-1231232
            type: salesAccountCustomFields
            partnerFields:
              - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                integerValue: 1000
                title: Title of 123448ca field
                description: Description for 123448ca field
                fieldType: integer
        Custom Fields with Date value Example:
          data:
            id: AG-1231233
            type: salesAccountCustomFields
            partnerFields:
              - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                dateValue: '2016-01-02T15:04:05Z'
                title: Title of 987448ca field
                description: Description for 987448ca field
                fieldType: date
        Custom Fields Full:
          data:
            id: AG-1231235
            type: salesAccountCustomFields
            partnerFields:
              - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                stringValue: A good string value
                title: Title of abc448ca field
                description: Description for abc448ca field
                fieldType: string
              - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                integerValue: 1000
                title: Title of 123448ca field
                description: Description for 123448ca field
                fieldType: integer
              - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                dateValue: '2022-01-02T15:04:05Z'
                title: Title of 987448ca field
                description: Description for 987448ca field
                fieldType: date
              - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00
                dropdownValue: red
                title: Title of 987448f2 field
                description: Description for 987448f2 field
                fieldType: dropdown
              - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01
                currencyValue: 10000
                title: Title of 98744854 field
                description: Description for 98744854 field
                fieldType: currency
                currencyCode: CAD
        Custom Fields with Dropdown Example:
          data:
            id: AG-1231233
            type: salesAccountCustomFields
            partnerFields:
              - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00
                dropdownValue: red
                title: Title of 987448f2 field
                description: Description for 987448f2 field
                fieldType: dropdown
        Custom Fields with Currency Example:
          data:
            id: AG-1231233
            type: salesAccountCustomFields
            partnerFields:
              - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01
                currencyValue: 10000
                title: Title of 98744854 field
                description: Description for 98744854 field
                fieldType: currency
                currencyCode: CAD
      x-tags:
        - Sales Account Custom Fields
      properties:
        id:
          type: string
          example: AG-1231232
          description: 'An identifier for the parent entity, for example salesAccount (AG-1231231)'
          readOnly: true
        type:
          type: string
          default: salesAccountCustomFields
          enum:
            - salesAccountCustomFields
          description: Should always be salesAccountCustomFields
        partnerFields:
          type: array
          description: |-
            List of custom fields specific to the partner with a direct relationship to the sales account.
            To send a new value each field must have at least the fieldId and its correspondent value.
            For example a field of type string must have the stringValue attribute filled.

            string -> stringValue

            integer -> integerValue

            date -> dateValue

            Only the fields that you wish to modify need to be sent.
          items:
            type: object
            properties:
              fieldId:
                type: string
                description: 'Field identifier, can be retrieved by listing the attributes'
              externalId:
                type: string
                description: 'Alternative field identifier, can be set on admin panel and can be retrieved by listing the attributes'
              fieldType:
                type: string
                example: string
                enum:
                  - string
                  - integer
                  - date
                  - dropdown
                  - currency
                description: |-
                  Indicates which of the value fields to use to read or write the data. It can only be modified from within partner center.

                  string -> stringValue
                  integer -> integerValue
                  date -> dateValue
                  dropdown -> dropdownValue
                  currency -> currencyValue
                readOnly: true
              stringValue:
                type: string
                description: Required when the field type is `string`
              integerValue:
                type: integer
                description: Required when the field type is `integer`
              dateValue:
                type: string
                description: Required when the field type is `date`
                format: date
              dropdownValue:
                type: string
                description: Required when type is `dropdown`. The possible values can be discovered using the administration panel.
              currencyValue:
                type: integer
                description: |-
                  Required when the field type is `currency`.

                  This field represents the cents (or the smallest part of the currency).

                  Example:
                  USD 600.00 -> currencyValue=60000
              currencyCode:
                type: string
                minLength: 3
                maxLength: 3
                description: |-
                  Represents the type of currency when the field is type `currency`. It will be the 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)

                  Ex: USD, CAD, AUD
                example: USD
                readOnly: true
              title:
                type: string
                description: 'The main label for the field, appearing in most user interfaces that show the value. This field is not read when setting a value.'
                readOnly: true
              description:
                type: string
                description: 'A longer text explanation of the field, it optionally appears in the UI. This field is not read when setting a value.'
                readOnly: true
      required:
        - id
        - type
    userCustomFields:
      title: User Custom Fields
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom fields associated with a user. The field definitions can be managed at Partner Center -> Administration -> Custom Fields.

        One form of identifier should be chosen, either `fieldId` or `externalId`.
        `fieldId` is the computer generated ID (like `FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99`) and `externalId` is a optional human-readable ID that can be set in the administration panel.

        Dropdown possible value and the currency code are also configured in the Administration panel.
      x-examples:
        Custom Fields with string value Example:
          data:
            id: U-12345678-abcd-1234-abcd-123456789abc
            type: userCustomFields
            partnerFields:
              - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                stringValue: A good string value
                title: Title of abc448ca field
                description: Description for abc448ca field
                fieldType: string
        Custom Fields with integer value Example:
          data:
            id: U-12345678-abcd-1234-abcd-123456789abd
            type: userCustomFields
            partnerFields:
              - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                integerValue: 1000
                title: Title of 123448ca field
                description: Description for 123448ca field
                fieldType: integer
        Custom Fields with Date value Example:
          data:
            id: U-12345678-abcd-1234-abcd-123456789abe
            type: userCustomFields
            partnerFields:
              - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                dateValue: '2016-01-02T15:04:05Z'
                title: Title of 987448ca field
                description: Description for 987448ca field
                fieldType: date
        Custom Fields Full:
          data:
            id: U-12345678-abcd-1234-abcd-123456789abf
            type: userCustomFields
            partnerFields:
              - fieldId: FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99
                stringValue: A good string value
                title: Title of abc448ca field
                description: Description for abc448ca field
                fieldType: string
              - fieldId: FieldID-123448ca-abc0-abc5-abc2-abc640bf4b99
                integerValue: 1000
                title: Title of 123448ca field
                description: Description for 123448ca field
                fieldType: integer
              - fieldId: FieldID-987448ca-abc0-abc5-abc2-abc640bf4b99
                dateValue: '2022-01-02T15:04:05Z'
                title: Title of 987448ca field
                description: Description for 987448ca field
                fieldType: date
              - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00
                dropdownValue: red
                title: Title of 987448f2 field
                description: Description for 987448f2 field
                fieldType: dropdown
              - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01
                currencyValue: 10000
                title: Title of 98744854 field
                description: Description for 98744854 field
                fieldType: currency
                currencyCode: CAD
        Custom Fields with Dropdown Example:
          data:
            id: U-12345678-abcd-1234-abcd-123456789abc
            type: userCustomFields
            partnerFields:
              - fieldId: FieldID-987448f2-abc0-abc5-abc2-abc640bf4b00
                dropdownValue: red
                title: Title of 987448f2 field
                description: Description for 987448f2 field
                fieldType: dropdown
        Custom Fields with Currency Example:
          data:
            id: U-12345678-abcd-1234-abcd-123456789abc
            type: userCustomFields
            partnerFields:
              - fieldId: FieldID-98744854-abc0-abc5-abc2-abc640bf4b01
                currencyValue: 10000
                title: Title of 98744854 field
                description: Description for 98744854 field
                fieldType: currency
                currencyCode: CAD
      x-tags:
        - User Custom Fields
      properties:
        id:
          type: string
          example: U-12345678-abcd-1234-abcd-123456789abc
          description: 'An identifier for the parent entity, in this case user'
          readOnly: true
        type:
          type: string
          default: userCustomFields
          enum:
            - userCustomFields
          description: Should always be userCustomFields
        partnerFields:
          type: array
          description: |-
            List of custom fields specific to the partner with a direct relationship to the user/contact.
            To send a new value each field must have at least the fieldId and its correspondent value.
            For example a field of type string must have the stringValue attribute filled.

            string -> stringValue

            integer -> integerValue

            date -> dateValue

            Only the fields that you wish to modify need to be sent.
          items:
            type: object
            properties:
              fieldId:
                type: string
                description: 'Field identifier, can be retrieved by listing the attributes'
              externalId:
                type: string
                description: 'Alternative field identifier, can be set on admin panel and can be retrieved by listing the attributes'
              fieldType:
                type: string
                example: string
                enum:
                  - string
                  - integer
                  - date
                  - dropdown
                  - currency
                description: |-
                  Indicates which of the value fields to use to read or write the data. It can only be modified from within partner center.

                  string -> stringValue
                  integer -> integerValue
                  date -> dateValue
                  dropdown -> dropdownValue
                  currency -> currencyValue
                readOnly: true
              stringValue:
                type: string
                description: Required when the field type is `string`
              integerValue:
                type: integer
                description: Required when the field type is `integer`
              dateValue:
                type: string
                description: Required when the field type is `date`
                format: date
              dropdownValue:
                type: string
                description: Required when type is `dropdown`. The possible values can be discovered using the administration panel.
              currencyValue:
                type: integer
                description: |-
                  Required when the field type is `currency`.

                  This field represents the cents (or the smallest part of the currency).

                  Example:
                  USD 600.00 -> currencyValue=60000
              currencyCode:
                type: string
                minLength: 3
                maxLength: 3
                description: |-
                  Represents the type of currency when the field is type `currency`. It will be the 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)

                  Ex: USD, CAD, AUD
                example: USD
                readOnly: true
              title:
                type: string
                description: 'The main label for the field, appearing in most user interfaces that show the value. This field is not read when setting a value.'
                readOnly: true
              description:
                type: string
                description: 'A longer text explanation of the field, it optionally appears in the UI. This field is not read when setting a value.'
                readOnly: true
      required:
        - id
        - type
    productCustomFields:
      title: Product Custom Fields
      type: object
      x-lifecycle:
        status: trustedTester
      description: |-
        [Status](https://developers.vendasta.com/platform/ZG9jOjEwMTU2NTYy-versioning): `Trusted Tester`

        Custom fields associated with a product. These attributes can be managed at Partner Center -> Administration -> Data attributes.

        One form of identifier should be chosen, either `fieldId` or `externalId`.
        `fieldId` is the computer generated ID (like `FieldID-abc448ca-abc0-abc5-abc2-abc640bf4b99`) and `externalId` is a optional human-readable ID that can be set in the administration panel.

        Dropdown possible values and the currency code are also configured in the Administration panel.
      x-tags:
        - Product Custom Fields
      properties:
        id:
          type: string
          description: 'An identifier for the parent entity, for example product (ABC-MP-1234567890ABCDEFGHIJKLMNOPQRSTUV)'
          readOnly: true
        type:
          type: string
          default: productCustomFields
          enum:
            - productCustomFields
          description: Should always be productCustomFields
        partnerFields:
          type: array
          description: |-
            List of custom fields specific to the partner with a direct relationship to the product.
            To send a new value each field must have at least the fieldId and its correspondent value.
            For example a field of type string must have the stringValue attribute filled.

            string -> stringValue

            integer -> integerValue

            date -> dateValue

            Only the fields that you wish to modify need to be sent.
          items:
            type: object
            properties:
              fieldId:
                type: string
                description: 'Field identifier, can be retrieved by listing the attributes'
              externalId:
                type: string
                description: 'Alternative field identifier, can be set on admin panel and can be retrieved by listing the attributes'
              fieldType:
                type: string
                example: string
                enum:
                  - string
                  - integer
                  - date
                  - dropdown
                  - currency
                description: |-
                  Indicates which of the value fields to use to read or write the data. It can only be modified from within partner center.

                  string -> stringValue
                  integer -> integerValue
                  date -> dateValue
                  dropdown -> dropdownValue
                  currency -> currencyValue
                readOnly: true
              stringValue:
                type: string
                description: Required when the field type is `string`
              integerValue:
                type: integer
                description: Required when the field type is `integer`
              dateValue:
                type: string
                description: Required when the field type is `date`
                format: date
              dropdownValue:
                type: string
                description: Required when type is `dropdown`. The possible values can be discovered using the administration panel.
              currencyValue:
                type: integer
                description: |-
                  Required when the field type is `currency`.

                  This field represents the cents (or the smallest part of the currency).

                  Example:
                  USD 600.00 -> currencyValue=60000
              currencyCode:
                type: string
                minLength: 3
                maxLength: 3
                description: |-
                  Represents the type of currency when the field is type `currency`. It will be the 3 letter currency code as defined by [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)

                  Ex: USD, CAD, AUD
                example: USD
                readOnly: true
              title:
                type: string
                description: 'The main label for the field, appearing in most user interfaces that show the value. This field is not read when setting a value.'
                readOnly: true
              description:
                type: string
                description: 'A longer text explanation of the field, it optionally appears in the UI. This field is not read when setting a value.'
                readOnly: true
      required:
        - id
        - type
    hoursOfOperation:
      type: array
      description: The operating hours for the business location. Each entry in the array is a set of hours for a particular department or customer of the business. It is recommended to provide the `general` hours for all locations. Some locations may have additional definitions for other departments.
      nullable: true
      items:
        type: object
        required:
          - hoursTypeId
        properties:
          hoursTypeId:
            type: string
            enum:
              - general
              - delivery
              - kitchen
              - driveThrough
              - pickup
              - takeout
            description: |-
              The category of hours that may apply to a specific department or service. Not all types are valid for all business categories.

              The general hours for a location must be set before defining hours for other departments. 

              Currently only `general` is supported in the Vendasta platform. We intend to add others in the future.
          regularHours:
            title: Hours on the days of the week
            type: array
            description: |-
              A collection of times that this location is open for business. Each period represents a range of hours when the location is open during the week.

              You may specify multiple entries for the same date if you are open for multiple periods (Example lunch and supper).
            nullable: true
            items:
              type: object
              required:
                - openDay
                - closeDay
                - openTime
                - closeTime
              properties:
                openDay:
                  allOf:
                    - description: Indicates the day of the week that this period starts on.
                    - $ref: '#/components/schemas/dayOfTheWeek'
                closeDay:
                  allOf:
                    - description: Indicates the day of the week that this period ends on. It should be the same as `openDay` except when the period goes over midnight. The total period may not be more than 24 hours.
                    - $ref: '#/components/schemas/dayOfTheWeek'
                openTime:
                  $ref: '#/components/schemas/timeOfDay'
                closeTime:
                  $ref: '#/components/schemas/timeOfDay'
          specialHours:
            type: array
            description: |-
              Represents a set of time periods when a location's operational hours differ from its regular business hours. This may be a holiday or special event. These hours replace the regular hours for the day.

              A special hour period must represent a range of less than 24 hours. The `openTime` and `startDate` must predate the `closeTime` and `endDate`. 
              The `closeTime` and `endDate` can extend to 11:59 a.m. on the day after the specified `startDate`.

              Note: Most listing sites only support special hours for the general type.
            nullable: true
            items:
              type: object
              required:
                - startDate
                - endDate
                - startTime
                - endTime
              properties:
                status:
                  x-stoplight:
                    id: nav2z12fnl9fr
                  enum:
                    - open
                    - closed
                  description: 'Describes the different modes that apply to special hour periods. Currently only `open` and `closed` are supported in the Vendasta platform. Overlapping `open` and `closed` periods are not allowed. When status is `open`, for the given business it will be open for the mentioned time period for the selected date. When status is `closed`, for the given business it will be closed for the selected date.'
                startDate:
                  description: The calendar date this special hour period starts on.
                  type: string
                  format: date
                endDate:
                  description: 'The calendar date this special hour period ends on. If `endDate` field is not set, default to the date specified in `startDate`. If set, this field must be equal to or at most 1 day after `startDate`.'
                  type: string
                  format: date
                startTime:
                  $ref: '#/components/schemas/timeOfDay'
                endTime:
                  $ref: '#/components/schemas/timeOfDay'
    dayOfTheWeek:
      type: string
      title: a day of the week
      enum:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
      example: wednesday
    timeOfDay:
      type: string
      title: a time of day
      description: 'Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.'
      pattern: '^\d{2}:\d{2}$'
      example: '09:45'
    lineItem:
      title: lineItem
      x-stoplight:
        id: 19w8f2ir7f1s9
      type: object
      description: Represents an item that is being bought/sold
      x-tags:
        - Orders
        - Proposals
      properties:
        sku:
          type: string
          description: 'The unique identifier of a product, product edition or package. It can be obtained by following [this guide](/guides/sales/find-sku).'
          example: A-123
          default: ''
        type:
          type: string
          default: lineItem
          example: lineItem
        quantity:
          type: integer
          description: The number of units to ordered
          default: 1
        amount:
          type: integer
          description: The unit price in cents. If not provided the default price for this sku in the marketplace will be used.
          default: 0
        intervalCode:
          type: string
          enum:
            - onetime
            - monthly
            - yearly
            - ''
          description: The billing frequency
        isPackage:
          type: boolean
          description: Indicates if this lineitem is a package instead of a product or an addon.
          readOnly: true
        containedInPackage:
          type: string
          description: Holds the SKU of the package that this lineitem is part of. Products inside of a package do not have pricing so refer to the lineitem of the package SKU to find the price.
          default: ''
          example: 'MP-123:EDITION-123'
          readOnly: true
      required:
        - sku
    partnerActivatableProducts:
      type: object
      x-examples:
        Partner Activatable Product Example:
          id: 'MP-1234:EDITION-123'
          type: partnerActivatableProducts
          attributes:
            sku: 'MP-1234:EDITION-123'
            name: Product Name
            whiteLabelName: Custom Product Name
            iconUrl: 'https://example.com'
            tagline: Short Description
            bannerImageUrl: 'https://example.com'
            prices:
              - amount: 0
                currencyCode: CAD
                frequency: UNIT_BILLING_FREQUENCY_MONTHLY
                type: retail
          relationships:
            allowedCountries:
              data:
                - id: US
                  type: countries
            requiredProductIds:
              data:
                - id: 'MP-456:EDITION-456'
                  type: partnerActivatableProducts
      description: Details on the products you are currently selling in your store.
      title: Partner Activatable Products
      x-tags:
        - Partner Activatable Products
      properties:
        id:
          type: string
          description: Unique identifier of the record.
          example: 'MP-1234:EDITION-123'
        type:
          type: string
          description: Should always be partnerActivatableProducts.
          default: partnerActivatableProducts
          enum:
            - partnerActivatableProducts
        relationships:
          type: object
          properties:
            allowedCountries:
              type: object
              description: 'Allowed list of countries as 2-letter codes where the product can be sold. If empty, its allowed for any country. Country name from the code can be obtained with [Countries API](platform.yaml/paths/~1countries/get)'
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: US
                      type:
                        type: string
                        enum:
                          - countries
                        default: countries
            requiredProducts:
              type: object
              description: List of IDs of the products to be activated before activating this product.
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 'ABC:default:MP-456:EDITION-456'
                      type:
                        type: string
                        enum:
                          - partnerActivatableProducts
                        default: partnerActivatableProducts
        attributes:
          type: object
          properties:
            sku:
              type: string
              description: 'The unique identifier of a product, product edition or package. It can be obtained by following [this guide](/guides/sales/find-sku).'
              example: 'MP-1234:EDITION-123'
            name:
              type: string
              description: Vendor provided name for the product.
              example: Product Name
            whiteLabelName:
              type: string
              description: Custom name for the product set by the Partner.
              example: Custom Product Name
            iconUrl:
              type: string
              description: 'Product logo url. Url to the jpg or png image with 1:1 aspect ratio. (Recommended: 240px x 240px).'
              format: uri
            tagline:
              type: string
              description: Briefly describes what the product does.
              example: Short Description
            bannerImageUrl:
              type: string
              description: Url to access the large rectangular image at the top of the marketing page.
              format: uri
            prices:
              type: array
              description: Describes the price of the product.
              items:
                type: object
                properties:
                  frequency:
                    type: string
                    description: Billing frequency of the product.
                  type:
                    type: string
                    description: Denotes the type of price.
                    example: retail
                  currencyCode:
                    type: string
                    description: Type of currency (code) of the price.
                    example: CAD
                  amount:
                    type: number
                    description: The cost of the product.
                    example: 42
      required:
        - id
        - type
tags:
  - name: Automations
  - name: Automation Runs
  - name: Business Categories
  - name: Business Locations
  - name: Countries
  - name: Orders
  - name: Order Custom Fields
  - name: Order Fulfillment Forms
  - name: Partner Activatable Products
  - name: Partners
  - name: Products
  - name: Product Custom Fields
  - name: Proposals
  - name: Purchases
  - name: Sales Accounts
  - name: Sales Account Custom Fields
  - name: Sales Contacts
  - name: Subscription Assignments
  - name: Subscriptions
  - name: Users
  - name: User Custom Fields
  - name: Options
