AppZen Lookup Item API

The Lookup Item API from AppZen — 3 operation(s) for lookup item.

OpenAPI Specification

appzen-lookup-item-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Autonomous AP APIs Chart of Accounts Lookup Item API
  description: Public APIs for integrating with Autonomous AP
  version: 2.0.3
host: <env>.appzen.com
basePath: /dictionary-data-services
schemes:
- https
security:
- API Key Header: []
  Customer Id Header: []
  Customer Key Header: []
tags:
- name: Lookup Item
paths:
  /lookup:
    post:
      tags:
      - Lookup Item
      summary: Creates/updates a Lookup Item associated with a Look up Table.
      description: Creates a new Lookup Item. Returns a uuid for this lookup item. <br>When there already exists a lookup item (with the same lookup_item_name and lookup_item_id), then the operation is an update (in this case, the `status` in the response will be `UPDATED`).
      parameters:
      - $ref: '#/parameters/lookup-json-schema'
      responses:
        200:
          description: Updated
          schema:
            $ref: '#/definitions/uuid-updated'
        201:
          description: Created
          schema:
            $ref: '#/definitions/uuid'
        400:
          description: Bad Request
          schema:
            $ref: '#/definitions/http-400-error-response'
        401:
          description: Unauthorized
          schema:
            $ref: '#/definitions/http-401-error-response'
        403:
          description: Forbidden
          schema:
            $ref: '#/definitions/http-403-error-response'
        404:
          description: Not Found
          schema:
            $ref: '#/definitions/http-404-error-response'
        500:
          description: Internal Server Error
          schema:
            $ref: '#/definitions/http-500-error-response'
  /lookup/{uuid}:
    get:
      tags:
      - Lookup Item
      summary: Returns Lookup Item details
      description: Returns the details of a Lookup Item by its Appzen uuid
      produces:
      - application/json
      parameters:
      - $ref: '#/parameters/uuid'
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/lookup-get'
        400:
          description: Bad Request
          schema:
            $ref: '#/definitions/http-400-error-response'
        401:
          description: Unauthorized
          schema:
            $ref: '#/definitions/http-401-error-response'
        403:
          description: Forbidden
          schema:
            $ref: '#/definitions/http-403-error-response'
        404:
          description: Not Found
          schema:
            $ref: '#/definitions/http-404-error-response'
        500:
          description: Internal Server Error
          schema:
            $ref: '#/definitions/http-500-error-response'
  /lookup/lookup-name-id/{lookup-name-id}/lookup-item-id/{lookup-item-id}:
    get:
      tags:
      - Lookup Item
      summary: Returns Lookup Item details
      description: Returns the details of a Lookup Item matching the lookup-name-id and its external lookup-item-id
      produces:
      - application/json
      parameters:
      - $ref: '#/parameters/lookup-name-id'
      - $ref: '#/parameters/lookup-item-id'
      responses:
        200:
          description: OK
          schema:
            $ref: '#/definitions/lookup-get'
        400:
          description: Bad Request
          schema:
            $ref: '#/definitions/http-400-error-response'
        401:
          description: Unauthorized
          schema:
            $ref: '#/definitions/http-401-error-response'
        403:
          description: Forbidden
          schema:
            $ref: '#/definitions/http-403-error-response'
        404:
          description: Not Found
          schema:
            $ref: '#/definitions/http-404-error-response'
        500:
          description: Internal Server Error
          schema:
            $ref: '#/definitions/http-500-error-response'
definitions:
  http-500-error-response:
    type: object
    properties:
      timestamp:
        type: string
        example: 2019-01-17T16:12:45.977+0000
      status:
        type: string
        example: 500
      error:
        type: string
        example: Internal Server Error
      message:
        type: string
        example: 'Error code : 17e3338d - Unable to process your request at this moment, please try again later'
  http-404-error-response:
    type: object
    properties:
      timestamp:
        type: string
        example: 2019-01-17T16:12:45.977+0000
      status:
        type: string
        example: 404
      error:
        type: string
        example: Not Found
      message:
        type: string
        example: 'Error code : 17e3338d - The resource you specified cannot be not found'
  http-403-error-response:
    type: object
    properties:
      timestamp:
        type: string
        example: 2019-01-17T16:12:45.977+0000
      status:
        type: string
        example: 403
      error:
        type: string
        example: Forbidden
      message:
        type: string
        example: 'Error code : 17e3338d - You do not have permission to access this resource'
  lookup:
    properties:
      lookup_name_id:
        description: Lookup Table Id for this Lookup Item
        type: string
        example: TAX_APPLICABILITY
      lookup_item_id:
        example: XDES322
        description: Lookup Item Id from ERP system.
        type: string
      lookup_item_name:
        example: EMEA Region
        description: Lookup Item Name.
        type: string
      lookup_item_description:
        example: Tax Applicability in EMEA Region
        description: Lookup Item Description.
        type: string
      is_active:
        description: Is lookup active in the ERP system.
        default: true
        type: boolean
      parent_lookup_item_id:
        example: Euroasia
        description: deprecated - please use 'parent_lookup_item_ids' instead
        type: string
      parent_lookup_item_ids:
        example:
        - Euroasia
        - XDES323
        description: Parent Lookup Item Ids from ERP system.
        type: string
      created_at:
        allOf:
        - $ref: '#/definitions/date-time'
      updated_at:
        allOf:
        - $ref: '#/definitions/date-time'
    required:
    - lookup_name_id
    - lookup_item_id
    - lookup_item_name
  http-400-error-response:
    type: object
    properties:
      timestamp:
        type: string
        example: 2019-01-17T16:12:45.977+0000
      status:
        type: string
        example: 400
      error:
        type: string
        example: Bad Request
      message:
        type: string
        example: 'Error code : 17e3338d - Invalid request, please fix and resend'
  uuid:
    type: object
    properties:
      uuid:
        type: string
        example: 5fc03087-d265-11e7-b8c6-83e29cd24f4c
      status:
        type: string
        example: CREATED
  uuid-updated:
    type: object
    properties:
      uuid:
        type: string
        example: 5fc03087-d265-11e7-b8c6-83e29cd24f4c
      status:
        type: string
        example: UPDATED
  date-time:
    type: string
    format: date-time
    example: '2024-03-01T11:01:00Z'
    description: date should be in UTC format
  http-401-error-response:
    type: object
    properties:
      timestamp:
        type: string
        example: 2019-01-17T16:12:45.977+0000
      status:
        type: string
        example: 401
      error:
        type: string
        example: Unauthorized
      message:
        type: string
        example: 'Error code : 17e3338d - Unable to authenticate credentials'
  lookup-get:
    properties:
      lookup_name_id:
        description: Lookup Table Id for the Lookup Item
        type: string
        example: TAX_APPLICABILITY
      lookup_item_id:
        example: XDES322
        description: Lookup Item ID from ERP system.
        type: string
      lookup_item_name:
        example: EMEA Region
        description: Lookup Item Name.
        type: string
      lookup_item_description:
        example: Tax Applicability in EMEA Region
        description: Lookup Item Description.
        type: string
      is_active:
        description: Is lookup active in the ERP system.
        default: true
        type: boolean
      parent_lookup_name_id:
        description: Parent Lookup Table Id for parent Lookup Item
        type: string
        example: REGION
      parent_lookup_item_id:
        example: Euroasia
        description: Parent Lookup Item Id from ERP system.
        type: string
      parent_lookup_item_ids:
        example:
        - Euroasia
        - XDES323
        description: Parent Lookup Item Ids from ERP system.
        type: string
      created_at:
        allOf:
        - $ref: '#/definitions/date-time'
      updated_at:
        allOf:
        - $ref: '#/definitions/date-time'
      uuid:
        type: string
        example: 0045-89707-0906-DE3C
parameters:
  uuid:
    in: path
    description: Globally unique identifier for an uploaded document
    required: true
    name: uuid
    type: string
  lookup-json-schema:
    in: body
    required: true
    name: lookup-json-schema
    schema:
      $ref: '#/definitions/lookup'
  lookup-item-id:
    in: path
    description: lookup item id
    required: true
    name: lookup-item-id
    type: string
  lookup-name-id:
    in: path
    description: lookup table name id
    required: true
    name: lookup-name-id
    type: string
securityDefinitions:
  API Key Header:
    type: apiKey
    in: header
    name: x-api-key
  Customer Id Header:
    type: apiKey
    in: header
    name: customer-id
  Customer Key Header:
    type: apiKey
    in: header
    name: customer-key