Puzzle Customers API

The Customers API from Puzzle — 2 operation(s) for customers.

OpenAPI Specification

puzzle-customers-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Customers API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Customers
paths:
  /company/{id}/customers:
    get:
      operationId: customersApi
      summary: Get Customers
      description: 'Retrieves a list of all of the company''s customers.


        Required scope: write:customer'
      tags:
      - Customers
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: name
        in: query
        required: false
        schema:
          type: string
      - name: type
        in: query
        required: false
        schema:
          type: string
          enum:
          - Individual
          - Business
          - Unknown
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - Active
          - Inactive
          - Unknown
      - name: count
        in: query
        required: false
        schema:
          type: integer
      - name: after
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        name:
                          type: string
                          nullable: true
                        email:
                          type: string
                          nullable: true
                        phoneNumber:
                          type: string
                          nullable: true
                        billingAddressJson:
                          type: object
                          properties:
                            zip:
                              type: string
                            city:
                              type: string
                            addressLine1:
                              type: string
                            addressLine2:
                              type: string
                            state:
                              anyOf:
                              - type: string
                                enum:
                                - ''
                              - type: object
                                properties:
                                  label:
                                    type: string
                                  value:
                                    type: string
                                required:
                                - label
                                - value
                            country:
                              anyOf:
                              - type: string
                                enum:
                                - ''
                              - type: object
                                properties:
                                  label:
                                    type: string
                                  value:
                                    type: string
                                required:
                                - label
                                - value
                          required:
                          - zip
                          - city
                          - addressLine1
                          - addressLine2
                          nullable: true
                        companyName:
                          type: string
                          nullable: true
                        contactName:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        website:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                          - Active
                          - Inactive
                          - Unknown
                          nullable: true
                        type:
                          type: string
                          enum:
                          - Individual
                          - Business
                          - Unknown
                          nullable: true
                      required:
                      - id
                      - name
                      - email
                      - phoneNumber
                      - billingAddressJson
                      - companyName
                      - contactName
                      - description
                      - website
                      - status
                      - type
                  pageInfo:
                    type: object
                    properties:
                      endCursor:
                        type: string
                        nullable: true
                      hasNextPage:
                        type: boolean
                      total:
                        type: integer
                        nullable: true
                    required:
                    - endCursor
                    - hasNextPage
                    - total
                required:
                - items
                - pageInfo
    post:
      operationId: createCustomerApi
      summary: Create Customer
      description: 'Creates a new Customer for the company.


        Required scope: write:customer'
      tags:
      - Customers
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                email:
                  type: string
                phoneNumber:
                  type: string
                billingAddressJson:
                  type: object
                  properties:
                    zip:
                      type: string
                    city:
                      type: string
                    addressLine1:
                      type: string
                    addressLine2:
                      type: string
                    state:
                      anyOf:
                      - type: string
                        enum:
                        - ''
                      - type: object
                        properties:
                          label:
                            type: string
                          value:
                            type: string
                        required:
                        - label
                        - value
                    country:
                      anyOf:
                      - type: string
                        enum:
                        - ''
                      - type: object
                        properties:
                          label:
                            type: string
                          value:
                            type: string
                        required:
                        - label
                        - value
                  required:
                  - zip
                  - city
                  - addressLine1
                  - addressLine2
                  nullable: true
                companyName:
                  type: string
                contactName:
                  type: string
                description:
                  type: string
                website:
                  type: string
                status:
                  type: string
                  enum:
                  - Active
                  - Inactive
                  - Unknown
                type:
                  type: string
                  enum:
                  - Individual
                  - Business
                  - Unknown
              required:
              - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  name:
                    type: string
                    nullable: true
                  email:
                    type: string
                    nullable: true
                  phoneNumber:
                    type: string
                    nullable: true
                  billingAddressJson:
                    type: object
                    properties:
                      zip:
                        type: string
                      city:
                        type: string
                      addressLine1:
                        type: string
                      addressLine2:
                        type: string
                      state:
                        anyOf:
                        - type: string
                          enum:
                          - ''
                        - type: object
                          properties:
                            label:
                              type: string
                            value:
                              type: string
                          required:
                          - label
                          - value
                      country:
                        anyOf:
                        - type: string
                          enum:
                          - ''
                        - type: object
                          properties:
                            label:
                              type: string
                            value:
                              type: string
                          required:
                          - label
                          - value
                    required:
                    - zip
                    - city
                    - addressLine1
                    - addressLine2
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  contactName:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  website:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                    - Active
                    - Inactive
                    - Unknown
                    nullable: true
                  type:
                    type: string
                    enum:
                    - Individual
                    - Business
                    - Unknown
                    nullable: true
                required:
                - id
                - name
                - email
                - phoneNumber
                - billingAddressJson
                - companyName
                - contactName
                - description
                - website
                - status
                - type
  /company/{id}/customers/{customerId}:
    patch:
      operationId: updateCustomerApi
      summary: Update Customer
      description: 'Updates a Customer for the company.


        Required scope: write:customer'
      tags:
      - Customers
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: customerId
        in: path
        required: true
        description: The customer ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                email:
                  type: string
                phoneNumber:
                  type: string
                billingAddressJson:
                  type: object
                  properties:
                    zip:
                      type: string
                    city:
                      type: string
                    addressLine1:
                      type: string
                    addressLine2:
                      type: string
                    state:
                      anyOf:
                      - type: string
                        enum:
                        - ''
                      - type: object
                        properties:
                          label:
                            type: string
                          value:
                            type: string
                        required:
                        - label
                        - value
                    country:
                      anyOf:
                      - type: string
                        enum:
                        - ''
                      - type: object
                        properties:
                          label:
                            type: string
                          value:
                            type: string
                        required:
                        - label
                        - value
                  required:
                  - zip
                  - city
                  - addressLine1
                  - addressLine2
                  nullable: true
                companyName:
                  type: string
                contactName:
                  type: string
                description:
                  type: string
                website:
                  type: string
                status:
                  type: string
                  enum:
                  - Active
                  - Inactive
                  - Unknown
                type:
                  type: string
                  enum:
                  - Individual
                  - Business
                  - Unknown
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  name:
                    type: string
                    nullable: true
                  email:
                    type: string
                    nullable: true
                  phoneNumber:
                    type: string
                    nullable: true
                  billingAddressJson:
                    type: object
                    properties:
                      zip:
                        type: string
                      city:
                        type: string
                      addressLine1:
                        type: string
                      addressLine2:
                        type: string
                      state:
                        anyOf:
                        - type: string
                          enum:
                          - ''
                        - type: object
                          properties:
                            label:
                              type: string
                            value:
                              type: string
                          required:
                          - label
                          - value
                      country:
                        anyOf:
                        - type: string
                          enum:
                          - ''
                        - type: object
                          properties:
                            label:
                              type: string
                            value:
                              type: string
                          required:
                          - label
                          - value
                    required:
                    - zip
                    - city
                    - addressLine1
                    - addressLine2
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  contactName:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  website:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                    - Active
                    - Inactive
                    - Unknown
                    nullable: true
                  type:
                    type: string
                    enum:
                    - Individual
                    - Business
                    - Unknown
                    nullable: true
                required:
                - id
                - name
                - email
                - phoneNumber
                - billingAddressJson
                - companyName
                - contactName
                - description
                - website
                - status
                - type