Skip to content

Latest commit

 

History

History
4779 lines (3717 loc) · 131 KB

PosApi.md

File metadata and controls

4779 lines (3717 loc) · 131 KB

Apideck.Pos

Class Name

PosApi

Methods

Create Item

Method: itemsAdd

posApi.itemsAdd(body)

Parameters

Name Type Description Notes
item Item
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateItemResponse

HTTP response details

Status code Description
201 Items
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  item: {
    id: '#cocoa',
    idempotency_key: 'random_string',
    name: 'Cocoa',
    description: 'Hot Chocolate',
    abbreviation: 'Ch',
    product_type: 'regular',
    price_amount: 10,
    pricing_type: 'fixed',
    price_currency: 'USD',
    cost: 2,
    tax_ids: [
      '12345',
      '67890'
    ],
    is_revenue: false,
    use_default_tax_rates: false,
    absent_at_location_ids: [
      '12345',
      '67890'
    ],
    present_at_all_locations: false,
    available_for_pickup: false,
    available_online: false,
    sku: '11910345',
    code: '11910345',
    categories: [
      {
        id: '12345',
        name: 'Food',
        image_ids: [
          '12345',
          '67890'
        ]
      }
    ],
    options: [
      {
        id: '12345',
        name: 'Option 1',
        attribute_id: '12345'
      }
    ],
    variations: [
      {
        id: '12345',
        name: 'Food',
        sku: '11910345',
        item_id: '12345',
        sequence: 0,
        pricing_type: 'fixed',
        price_amount: 10,
        price_currency: 'USD',
        image_ids: [
          '12345',
          '67890'
        ]
      }
    ],
    modifier_groups: [
      {
        id: '12345'
      }
    ],
    available: true,
    hidden: true,
    deleted: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.itemsAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Items

Method: itemsAll

posApi.itemsAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetItemsResponse

HTTP response details

Status code Description
200 Items
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.itemsAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Item

Method: itemsDelete

posApi.itemsDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteItemResponse

HTTP response details

Status code Description
200 Items
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.itemsDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Item

Method: itemsOne

posApi.itemsOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetItemResponse

HTTP response details

Status code Description
200 Items
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.itemsOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Item

Method: itemsUpdate

posApi.itemsUpdate(body)

Parameters

Name Type Description Notes
item Item
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateItemResponse

HTTP response details

Status code Description
200 Items
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  item: {
    id: '#cocoa',
    idempotency_key: 'random_string',
    name: 'Cocoa',
    description: 'Hot Chocolate',
    abbreviation: 'Ch',
    product_type: 'regular',
    price_amount: 10,
    pricing_type: 'fixed',
    price_currency: 'USD',
    cost: 2,
    tax_ids: [
      '12345',
      '67890'
    ],
    is_revenue: false,
    use_default_tax_rates: false,
    absent_at_location_ids: [
      '12345',
      '67890'
    ],
    present_at_all_locations: false,
    available_for_pickup: false,
    available_online: false,
    sku: '11910345',
    code: '11910345',
    categories: [
      {
        id: '12345',
        name: 'Food',
        image_ids: [
          '12345',
          '67890'
        ]
      }
    ],
    options: [
      {
        id: '12345',
        name: 'Option 1',
        attribute_id: '12345'
      }
    ],
    variations: [
      {
        id: '12345',
        name: 'Food',
        sku: '11910345',
        item_id: '12345',
        sequence: 0,
        pricing_type: 'fixed',
        price_amount: 10,
        price_currency: 'USD',
        image_ids: [
          '12345',
          '67890'
        ]
      }
    ],
    modifier_groups: [
      {
        id: '12345'
      }
    ],
    available: true,
    hidden: true,
    deleted: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.itemsUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Location

Method: locationsAdd

posApi.locationsAdd(body)

Parameters

Name Type Description Notes
location Location
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateLocationResponse

HTTP response details

Status code Description
201 Locations
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  location: {
    name: 'Dunkin Donuts',
    business_name: 'Dunkin Donuts LLC',
    address: {
      id: '123',
      type: 'primary',
      string: '25 Spring Street, Blackburn, VIC 3130',
      name: 'HQ US',
      line1: 'Main street',
      line2: 'apt #',
      line3: 'Suite #',
      line4: 'delivery instructions',
      street_number: '25',
      city: 'San Francisco',
      state: 'CA',
      postal_code: '94104',
      country: 'US',
      latitude: '40.759211',
      longitude: '-73.984638',
      county: 'Santa Clara',
      contact_name: 'Elon Musk',
      salutation: 'Mr',
      phone_number: '111-111-1111',
      fax: '122-111-1111',
      email: '[email protected]',
      website: 'https://elonmusk.com',
      notes: 'Address notes or delivery instructions.',
      row_version: '1-12345'
    },
    status: 'active',
    merchant_id: '12345',
    currency: 'USD',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.locationsAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Locations

Method: locationsAll

posApi.locationsAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetLocationsResponse

HTTP response details

Status code Description
200 Locations
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.locationsAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Location

Method: locationsDelete

posApi.locationsDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteLocationResponse

HTTP response details

Status code Description
200 Locations
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.locationsDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Location

Method: locationsOne

posApi.locationsOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetLocationResponse

HTTP response details

Status code Description
200 Locations
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.locationsOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Location

Method: locationsUpdate

posApi.locationsUpdate(body)

Parameters

Name Type Description Notes
location Location
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateLocationResponse

HTTP response details

Status code Description
200 Locations
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  location: {
    name: 'Dunkin Donuts',
    business_name: 'Dunkin Donuts LLC',
    address: {
      id: '123',
      type: 'primary',
      string: '25 Spring Street, Blackburn, VIC 3130',
      name: 'HQ US',
      line1: 'Main street',
      line2: 'apt #',
      line3: 'Suite #',
      line4: 'delivery instructions',
      street_number: '25',
      city: 'San Francisco',
      state: 'CA',
      postal_code: '94104',
      country: 'US',
      latitude: '40.759211',
      longitude: '-73.984638',
      county: 'Santa Clara',
      contact_name: 'Elon Musk',
      salutation: 'Mr',
      phone_number: '111-111-1111',
      fax: '122-111-1111',
      email: '[email protected]',
      website: 'https://elonmusk.com',
      notes: 'Address notes or delivery instructions.',
      row_version: '1-12345'
    },
    status: 'active',
    merchant_id: '12345',
    currency: 'USD',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.locationsUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Merchant

Method: merchantsAdd

posApi.merchantsAdd(body)

Parameters

Name Type Description Notes
merchant Merchant
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateMerchantResponse

HTTP response details

Status code Description
201 Merchants
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  merchant: {
    name: 'Dunkin Donuts',
    address: {
      id: '123',
      type: 'primary',
      string: '25 Spring Street, Blackburn, VIC 3130',
      name: 'HQ US',
      line1: 'Main street',
      line2: 'apt #',
      line3: 'Suite #',
      line4: 'delivery instructions',
      street_number: '25',
      city: 'San Francisco',
      state: 'CA',
      postal_code: '94104',
      country: 'US',
      latitude: '40.759211',
      longitude: '-73.984638',
      county: 'Santa Clara',
      contact_name: 'Elon Musk',
      salutation: 'Mr',
      phone_number: '111-111-1111',
      fax: '122-111-1111',
      email: '[email protected]',
      website: 'https://elonmusk.com',
      notes: 'Address notes or delivery instructions.',
      row_version: '1-12345'
    },
    owner_id: '12345',
    main_location_id: '12345',
    status: 'active',
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    language: 'EN',
    currency: 'USD',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.merchantsAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Merchants

Method: merchantsAll

posApi.merchantsAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetMerchantsResponse

HTTP response details

Status code Description
200 Merchants
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.merchantsAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Merchant

Method: merchantsDelete

posApi.merchantsDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteMerchantResponse

HTTP response details

Status code Description
200 Merchants
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.merchantsDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Merchant

Method: merchantsOne

posApi.merchantsOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetMerchantResponse

HTTP response details

Status code Description
200 Merchants
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.merchantsOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Merchant

Method: merchantsUpdate

posApi.merchantsUpdate(body)

Parameters

Name Type Description Notes
merchant Merchant
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateMerchantResponse

HTTP response details

Status code Description
200 Merchants
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  merchant: {
    name: 'Dunkin Donuts',
    address: {
      id: '123',
      type: 'primary',
      string: '25 Spring Street, Blackburn, VIC 3130',
      name: 'HQ US',
      line1: 'Main street',
      line2: 'apt #',
      line3: 'Suite #',
      line4: 'delivery instructions',
      street_number: '25',
      city: 'San Francisco',
      state: 'CA',
      postal_code: '94104',
      country: 'US',
      latitude: '40.759211',
      longitude: '-73.984638',
      county: 'Santa Clara',
      contact_name: 'Elon Musk',
      salutation: 'Mr',
      phone_number: '111-111-1111',
      fax: '122-111-1111',
      email: '[email protected]',
      website: 'https://elonmusk.com',
      notes: 'Address notes or delivery instructions.',
      row_version: '1-12345'
    },
    owner_id: '12345',
    main_location_id: '12345',
    status: 'active',
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    language: 'EN',
    currency: 'USD',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.merchantsUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Modifier Group

Method: modifierGroupsAdd

posApi.modifierGroupsAdd(body)

Parameters

Name Type Description Notes
modifierGroup ModifierGroup
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateModifierGroupResponse

HTTP response details

Status code Description
201 ModifierGroups
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  modifierGroup: {
    name: 'Modifier',
    alternate_name: 'Modifier New',
    minimum_required: 1,
    maximum_allowed: 5,
    selection_type: 'single',
    present_at_all_locations: false,
    modifiers: [
      {
        id: '12345',
        name: 'Modifier',
        alternate_name: 'Modifier New',
        price_amount: 10,
        currency: 'USD',
        available: true
      }
    ],
    deleted: true,
    row_version: '1-12345',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.modifierGroupsAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Modifier Groups

Method: modifierGroupsAll

posApi.modifierGroupsAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetModifierGroupsResponse

HTTP response details

Status code Description
200 ModifierGroups
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.modifierGroupsAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Modifier Group

Method: modifierGroupsDelete

posApi.modifierGroupsDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteModifierGroupResponse

HTTP response details

Status code Description
200 ModifierGroups
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.modifierGroupsDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Modifier Group

Method: modifierGroupsOne

posApi.modifierGroupsOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetModifierGroupResponse

HTTP response details

Status code Description
200 ModifierGroups
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.modifierGroupsOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Modifier Group

Method: modifierGroupsUpdate

posApi.modifierGroupsUpdate(body)

Parameters

Name Type Description Notes
modifierGroup ModifierGroup
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateModifierGroupResponse

HTTP response details

Status code Description
200 ModifierGroups
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  modifierGroup: {
    name: 'Modifier',
    alternate_name: 'Modifier New',
    minimum_required: 1,
    maximum_allowed: 5,
    selection_type: 'single',
    present_at_all_locations: false,
    modifiers: [
      {
        id: '12345',
        name: 'Modifier',
        alternate_name: 'Modifier New',
        price_amount: 10,
        currency: 'USD',
        available: true
      }
    ],
    deleted: true,
    row_version: '1-12345',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.modifierGroupsUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Modifier

Method: modifiersAdd

posApi.modifiersAdd(body)

Parameters

Name Type Description Notes
modifier Modifier
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateModifierResponse

HTTP response details

Status code Description
201 Modifiers
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  modifier: {
    idempotency_key: 'random_string',
    name: 'Modifier',
    alternate_name: 'Modifier New',
    price_amount: 10,
    currency: 'USD',
    modifier_group_id: '123',
    available: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.modifiersAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Modifiers

Method: modifiersAll

posApi.modifiersAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetModifiersResponse

HTTP response details

Status code Description
200 Modifiers
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.modifiersAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Modifier

Method: modifiersDelete

posApi.modifiersDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
filter ModifierGroupFilter Apply filters (optional)

Response Type

DeleteModifierResponse

HTTP response details

Status code Description
200 Modifiers
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.modifiersDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Modifier

Method: modifiersOne

posApi.modifiersOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
filter ModifierGroupFilter Apply filters (optional)
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetModifierResponse

HTTP response details

Status code Description
200 Modifiers
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.modifiersOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Modifier

Method: modifiersUpdate

posApi.modifiersUpdate(body)

Parameters

Name Type Description Notes
modifier Modifier
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateModifierResponse

HTTP response details

Status code Description
200 Modifiers
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  modifier: {
    idempotency_key: 'random_string',
    name: 'Modifier',
    alternate_name: 'Modifier New',
    price_amount: 10,
    currency: 'USD',
    modifier_group_id: '123',
    available: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.modifiersUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Order Type

Method: orderTypesAdd

posApi.orderTypesAdd(body)

Parameters

Name Type Description Notes
orderType OrderType
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateOrderTypeResponse

HTTP response details

Status code Description
201 OrderTypes
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  orderType: {
    name: 'Default order type',
    default: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.orderTypesAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Order Types

Method: orderTypesAll

posApi.orderTypesAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetOrderTypesResponse

HTTP response details

Status code Description
200 OrderTypes
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.orderTypesAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Order Type

Method: orderTypesDelete

posApi.orderTypesDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteOrderTypeResponse

HTTP response details

Status code Description
200 OrderTypes
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.orderTypesDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Order Type

Method: orderTypesOne

posApi.orderTypesOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetOrderTypeResponse

HTTP response details

Status code Description
200 OrderTypes
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.orderTypesOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Order Type

Method: orderTypesUpdate

posApi.orderTypesUpdate(body)

Parameters

Name Type Description Notes
orderType OrderType
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateOrderTypeResponse

HTTP response details

Status code Description
200 OrderTypes
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  orderType: {
    name: 'Default order type',
    default: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.orderTypesUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Order

Method: ordersAdd

posApi.ordersAdd(body)

Parameters

Name Type Description Notes
order Order
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateOrderResponse

HTTP response details

Status code Description
201 Orders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  order: {
    idempotency_key: 'random_string',
    order_number: '1F',
    order_date: '2022-08-12',
    closed_date: '2022-08-13',
    reference_id: 'my-order-001',
    status: 'open',
    payment_status: 'open',
    currency: 'USD',
    title: 'string',
    note: 'string',
    merchant_id: '12345',
    customer_id: '12345',
    employee_id: '12345',
    location_id: '12345',
    order_type_id: '12345',
    table: '1F',
    seat: '23F',
    total_amount: 275,
    total_tip: 700,
    total_tax: 275,
    total_discount: 300,
    total_refund: 0,
    total_service_charge: 0,
    refunded: false,
    customers: [
      {
        id: '12345',
        first_name: 'Elon',
        middle_name: 'D.',
        last_name: 'Musk',
        phone_numbers: [
          {
            id: '12345',
            country_code: '1',
            area_code: '323',
            number: '111-111-1111',
            extension: '105',
            type: 'primary'
          }
        ],
        emails: [
          {
            id: '123',
            email: '[email protected]',
            type: 'primary'
          }
        ]
      }
    ],
    fulfillments: [
      {
        id: '12345',
        status: 'proposed',
        type: 'shipment',
        pickup_details: {
          auto_complete_duration: 'P1W3D',
          cancel_reason: 'Not hungry',
          expires_at: '2016-09-04T23:59:33.123Z',
          schedule_type: 'scheduled',
          pickup_at: '2016-09-04T23:59:33.123Z',
          pickup_window_duration: 'P1W3D',
          prep_time_duration: 'P1W3D',
          note: 'Pickup in the back.',
          placed_at: '2016-09-04T23:59:33.123Z',
          rejected_at: '2016-09-04T23:59:33.123Z',
          ready_at: '2016-09-04T23:59:33.123Z',
          expired_at: '2016-09-04T23:59:33.123Z',
          picked_up_at: '2016-09-04T23:59:33.123Z',
          canceled_at: '2016-09-04T23:59:33.123Z',
          is_curbside_pickup: true,
          curbside_pickup_details: {
            curbside_details: 'string',
            buyer_arrived_at: '2016-09-04T23:59:33.123Z'
          },
          recipient: {
            customer_id: '12345',
            display_name: 'Elon Musk',
            address: [Object],
            phone_number: [Object],
            email: [Object]
          }
        },
        shipment_details: {}
      }
    ],
    line_items: [
      {
        name: 'New York Strip Steak',
        item: {},
        total_tax: 2000,
        total_discount: 3000,
        total_amount: 27500,
        quantity: 1,
        unit_price: 27500.5,
        applied_taxes: [
          {
            tax_id: 'sales-tax',
            amount: 27500,
            currency: 'USD'
          }
        ],
        applied_discounts: [
          {
            discount_id: '12345',
            amount: 27500,
            currency: 'USD'
          }
        ],
        modifiers: [
          {
            id: '12345',
            name: 'New York Strip Steak - no cheese',
            amount: 27500,
            currency: 'USD',
            alternate_name: 'Modifier New',
            modifier_group_id: '123'
          }
        ]
      }
    ],
    payments: [
      {
        amount: 27500,
        currency: 'USD'
      }
    ],
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    refunds: [
      {
        amount: 27500,
        currency: 'USD',
        reason: 'The reason for the refund being issued.',
        status: 'pending'
      }
    ],
    taxes: [
      {
        id: 'state-sales-tax',
        name: 'State Sales Tax',
        amount: 27500,
        currency: 'USD',
        percentage: 15,
        scope: 'order',
        type: 'unknown',
        auto_applied: true
      }
    ],
    discounts: [
      {
        name: '10% off',
        type: 'percentage',
        amount: 27500,
        currency: 'USD',
        scope: 'order'
      }
    ],
    tenders: [
      {
        name: '10% off',
        type: 'cash',
        note: 'An optional note associated with the tender at the time of payment.',
        amount: 27500,
        percentage: 10,
        currency: 'USD',
        total_amount: 275,
        total_tip: 7,
        total_processing_fee: 0,
        total_tax: 2.75,
        total_discount: 3,
        total_refund: 0,
        total_service_charge: 0,
        buyer_tendered_cash_amount: 27500,
        change_back_cash_amount: 27500,
        card: {
          bin: '41111',
          card_brand: 'visa',
          card_type: 'credit',
          prepaid_type: 'prepaid',
          cardholder_name: 'John Doe',
          customer_id: '12345',
          merchant_id: '12345',
          exp_month: 1,
          exp_year: 2022,
          fingerprint: ' Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.',
          last_4: 'The last 4 digits of the card number.',
          enabled: true,
          billing_address: {
            id: '123',
            type: 'primary',
            string: '25 Spring Street, Blackburn, VIC 3130',
            name: 'HQ US',
            line1: 'Main street',
            line2: 'apt #',
            line3: 'Suite #',
            line4: 'delivery instructions',
            street_number: '25',
            city: 'San Francisco',
            state: 'CA',
            postal_code: '94104',
            country: 'US',
            latitude: '40.759211',
            longitude: '-73.984638',
            county: 'Santa Clara',
            contact_name: 'Elon Musk',
            salutation: 'Mr',
            phone_number: '111-111-1111',
            fax: '122-111-1111',
            email: '[email protected]',
            website: 'https://elonmusk.com',
            notes: 'Address notes or delivery instructions.',
            row_version: '1-12345'
          },
          reference_id: 'card-001',
          version: '230320320320'
        },
        card_status: 'authorized',
        card_entry_method: 'swiped'
      }
    ],
    voided: false,
    version: '230320320320',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.ordersAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Orders

Method: ordersAll

posApi.ordersAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
locationId [string] ID of the location. (optional)
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetOrdersResponse

HTTP response details

Status code Description
200 Orders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.ordersAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Order

Method: ordersDelete

posApi.ordersDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteOrderResponse

HTTP response details

Status code Description
200 Orders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.ordersDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Order

Method: ordersOne

posApi.ordersOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetOrderResponse

HTTP response details

Status code Description
200 Orders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.ordersOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Pay Order

Method: ordersPay

posApi.ordersPay(body)

Parameters

Name Type Description Notes
order Order
id [string] ID of the record you are acting upon.
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

CreateOrderResponse

HTTP response details

Status code Description
201 Orders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  order: {
    idempotency_key: 'random_string',
    order_number: '1F',
    order_date: '2022-08-12',
    closed_date: '2022-08-13',
    reference_id: 'my-order-001',
    status: 'open',
    payment_status: 'open',
    currency: 'USD',
    title: 'string',
    note: 'string',
    merchant_id: '12345',
    customer_id: '12345',
    employee_id: '12345',
    location_id: '12345',
    order_type_id: '12345',
    table: '1F',
    seat: '23F',
    total_amount: 275,
    total_tip: 700,
    total_tax: 275,
    total_discount: 300,
    total_refund: 0,
    total_service_charge: 0,
    refunded: false,
    customers: [
      {
        id: '12345',
        first_name: 'Elon',
        middle_name: 'D.',
        last_name: 'Musk',
        phone_numbers: [
          {
            id: '12345',
            country_code: '1',
            area_code: '323',
            number: '111-111-1111',
            extension: '105',
            type: 'primary'
          }
        ],
        emails: [
          {
            id: '123',
            email: '[email protected]',
            type: 'primary'
          }
        ]
      }
    ],
    fulfillments: [
      {
        id: '12345',
        status: 'proposed',
        type: 'shipment',
        pickup_details: {
          auto_complete_duration: 'P1W3D',
          cancel_reason: 'Not hungry',
          expires_at: '2016-09-04T23:59:33.123Z',
          schedule_type: 'scheduled',
          pickup_at: '2016-09-04T23:59:33.123Z',
          pickup_window_duration: 'P1W3D',
          prep_time_duration: 'P1W3D',
          note: 'Pickup in the back.',
          placed_at: '2016-09-04T23:59:33.123Z',
          rejected_at: '2016-09-04T23:59:33.123Z',
          ready_at: '2016-09-04T23:59:33.123Z',
          expired_at: '2016-09-04T23:59:33.123Z',
          picked_up_at: '2016-09-04T23:59:33.123Z',
          canceled_at: '2016-09-04T23:59:33.123Z',
          is_curbside_pickup: true,
          curbside_pickup_details: {
            curbside_details: 'string',
            buyer_arrived_at: '2016-09-04T23:59:33.123Z'
          },
          recipient: {
            customer_id: '12345',
            display_name: 'Elon Musk',
            address: [Object],
            phone_number: [Object],
            email: [Object]
          }
        },
        shipment_details: {}
      }
    ],
    line_items: [
      {
        name: 'New York Strip Steak',
        item: {},
        total_tax: 2000,
        total_discount: 3000,
        total_amount: 27500,
        quantity: 1,
        unit_price: 27500.5,
        applied_taxes: [
          {
            tax_id: 'sales-tax',
            amount: 27500,
            currency: 'USD'
          }
        ],
        applied_discounts: [
          {
            discount_id: '12345',
            amount: 27500,
            currency: 'USD'
          }
        ],
        modifiers: [
          {
            id: '12345',
            name: 'New York Strip Steak - no cheese',
            amount: 27500,
            currency: 'USD',
            alternate_name: 'Modifier New',
            modifier_group_id: '123'
          }
        ]
      }
    ],
    payments: [
      {
        amount: 27500,
        currency: 'USD'
      }
    ],
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    refunds: [
      {
        amount: 27500,
        currency: 'USD',
        reason: 'The reason for the refund being issued.',
        status: 'pending'
      }
    ],
    taxes: [
      {
        id: 'state-sales-tax',
        name: 'State Sales Tax',
        amount: 27500,
        currency: 'USD',
        percentage: 15,
        scope: 'order',
        type: 'unknown',
        auto_applied: true
      }
    ],
    discounts: [
      {
        name: '10% off',
        type: 'percentage',
        amount: 27500,
        currency: 'USD',
        scope: 'order'
      }
    ],
    tenders: [
      {
        name: '10% off',
        type: 'cash',
        note: 'An optional note associated with the tender at the time of payment.',
        amount: 27500,
        percentage: 10,
        currency: 'USD',
        total_amount: 275,
        total_tip: 7,
        total_processing_fee: 0,
        total_tax: 2.75,
        total_discount: 3,
        total_refund: 0,
        total_service_charge: 0,
        buyer_tendered_cash_amount: 27500,
        change_back_cash_amount: 27500,
        card: {
          bin: '41111',
          card_brand: 'visa',
          card_type: 'credit',
          prepaid_type: 'prepaid',
          cardholder_name: 'John Doe',
          customer_id: '12345',
          merchant_id: '12345',
          exp_month: 1,
          exp_year: 2022,
          fingerprint: ' Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.',
          last_4: 'The last 4 digits of the card number.',
          enabled: true,
          billing_address: {
            id: '123',
            type: 'primary',
            string: '25 Spring Street, Blackburn, VIC 3130',
            name: 'HQ US',
            line1: 'Main street',
            line2: 'apt #',
            line3: 'Suite #',
            line4: 'delivery instructions',
            street_number: '25',
            city: 'San Francisco',
            state: 'CA',
            postal_code: '94104',
            country: 'US',
            latitude: '40.759211',
            longitude: '-73.984638',
            county: 'Santa Clara',
            contact_name: 'Elon Musk',
            salutation: 'Mr',
            phone_number: '111-111-1111',
            fax: '122-111-1111',
            email: '[email protected]',
            website: 'https://elonmusk.com',
            notes: 'Address notes or delivery instructions.',
            row_version: '1-12345'
          },
          reference_id: 'card-001',
          version: '230320320320'
        },
        card_status: 'authorized',
        card_entry_method: 'swiped'
      }
    ],
    voided: false,
    version: '230320320320',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.ordersPay(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Order

Method: ordersUpdate

posApi.ordersUpdate(body)

Parameters

Name Type Description Notes
order Order
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateOrderResponse

HTTP response details

Status code Description
200 Orders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  order: {
    idempotency_key: 'random_string',
    order_number: '1F',
    order_date: '2022-08-12',
    closed_date: '2022-08-13',
    reference_id: 'my-order-001',
    status: 'open',
    payment_status: 'open',
    currency: 'USD',
    title: 'string',
    note: 'string',
    merchant_id: '12345',
    customer_id: '12345',
    employee_id: '12345',
    location_id: '12345',
    order_type_id: '12345',
    table: '1F',
    seat: '23F',
    total_amount: 275,
    total_tip: 700,
    total_tax: 275,
    total_discount: 300,
    total_refund: 0,
    total_service_charge: 0,
    refunded: false,
    customers: [
      {
        id: '12345',
        first_name: 'Elon',
        middle_name: 'D.',
        last_name: 'Musk',
        phone_numbers: [
          {
            id: '12345',
            country_code: '1',
            area_code: '323',
            number: '111-111-1111',
            extension: '105',
            type: 'primary'
          }
        ],
        emails: [
          {
            id: '123',
            email: '[email protected]',
            type: 'primary'
          }
        ]
      }
    ],
    fulfillments: [
      {
        id: '12345',
        status: 'proposed',
        type: 'shipment',
        pickup_details: {
          auto_complete_duration: 'P1W3D',
          cancel_reason: 'Not hungry',
          expires_at: '2016-09-04T23:59:33.123Z',
          schedule_type: 'scheduled',
          pickup_at: '2016-09-04T23:59:33.123Z',
          pickup_window_duration: 'P1W3D',
          prep_time_duration: 'P1W3D',
          note: 'Pickup in the back.',
          placed_at: '2016-09-04T23:59:33.123Z',
          rejected_at: '2016-09-04T23:59:33.123Z',
          ready_at: '2016-09-04T23:59:33.123Z',
          expired_at: '2016-09-04T23:59:33.123Z',
          picked_up_at: '2016-09-04T23:59:33.123Z',
          canceled_at: '2016-09-04T23:59:33.123Z',
          is_curbside_pickup: true,
          curbside_pickup_details: {
            curbside_details: 'string',
            buyer_arrived_at: '2016-09-04T23:59:33.123Z'
          },
          recipient: {
            customer_id: '12345',
            display_name: 'Elon Musk',
            address: [Object],
            phone_number: [Object],
            email: [Object]
          }
        },
        shipment_details: {}
      }
    ],
    line_items: [
      {
        name: 'New York Strip Steak',
        item: {},
        total_tax: 2000,
        total_discount: 3000,
        total_amount: 27500,
        quantity: 1,
        unit_price: 27500.5,
        applied_taxes: [
          {
            tax_id: 'sales-tax',
            amount: 27500,
            currency: 'USD'
          }
        ],
        applied_discounts: [
          {
            discount_id: '12345',
            amount: 27500,
            currency: 'USD'
          }
        ],
        modifiers: [
          {
            id: '12345',
            name: 'New York Strip Steak - no cheese',
            amount: 27500,
            currency: 'USD',
            alternate_name: 'Modifier New',
            modifier_group_id: '123'
          }
        ]
      }
    ],
    payments: [
      {
        amount: 27500,
        currency: 'USD'
      }
    ],
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    refunds: [
      {
        amount: 27500,
        currency: 'USD',
        reason: 'The reason for the refund being issued.',
        status: 'pending'
      }
    ],
    taxes: [
      {
        id: 'state-sales-tax',
        name: 'State Sales Tax',
        amount: 27500,
        currency: 'USD',
        percentage: 15,
        scope: 'order',
        type: 'unknown',
        auto_applied: true
      }
    ],
    discounts: [
      {
        name: '10% off',
        type: 'percentage',
        amount: 27500,
        currency: 'USD',
        scope: 'order'
      }
    ],
    tenders: [
      {
        name: '10% off',
        type: 'cash',
        note: 'An optional note associated with the tender at the time of payment.',
        amount: 27500,
        percentage: 10,
        currency: 'USD',
        total_amount: 275,
        total_tip: 7,
        total_processing_fee: 0,
        total_tax: 2.75,
        total_discount: 3,
        total_refund: 0,
        total_service_charge: 0,
        buyer_tendered_cash_amount: 27500,
        change_back_cash_amount: 27500,
        card: {
          bin: '41111',
          card_brand: 'visa',
          card_type: 'credit',
          prepaid_type: 'prepaid',
          cardholder_name: 'John Doe',
          customer_id: '12345',
          merchant_id: '12345',
          exp_month: 1,
          exp_year: 2022,
          fingerprint: ' Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.',
          last_4: 'The last 4 digits of the card number.',
          enabled: true,
          billing_address: {
            id: '123',
            type: 'primary',
            string: '25 Spring Street, Blackburn, VIC 3130',
            name: 'HQ US',
            line1: 'Main street',
            line2: 'apt #',
            line3: 'Suite #',
            line4: 'delivery instructions',
            street_number: '25',
            city: 'San Francisco',
            state: 'CA',
            postal_code: '94104',
            country: 'US',
            latitude: '40.759211',
            longitude: '-73.984638',
            county: 'Santa Clara',
            contact_name: 'Elon Musk',
            salutation: 'Mr',
            phone_number: '111-111-1111',
            fax: '122-111-1111',
            email: '[email protected]',
            website: 'https://elonmusk.com',
            notes: 'Address notes or delivery instructions.',
            row_version: '1-12345'
          },
          reference_id: 'card-001',
          version: '230320320320'
        },
        card_status: 'authorized',
        card_entry_method: 'swiped'
      }
    ],
    voided: false,
    version: '230320320320',
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.ordersUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Payment

Method: paymentsAdd

posApi.paymentsAdd(body)

Parameters

Name Type Description Notes
payment PosPayment
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreatePosPaymentResponse

HTTP response details

Status code Description
201 PosPayments
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  payment: {
    source_id: '12345',
    order_id: '12345',
    merchant_id: '12345',
    customer_id: '12345',
    employee_id: '12345',
    location_id: '12345',
    device_id: '12345',
    tender_id: '12345',
    external_payment_id: '12345',
    idempotency_key: 'random_string',
    amount: 27.5,
    currency: 'USD',
    tip: 7,
    tax: 20,
    total: 37.5,
    app_fee: 3,
    change_back_cash_amount: 20,
    approved: 37.5,
    refunded: 37.5,
    processing_fees: [
      {
        amount: 1.05,
        effective_at: '2020-09-30T07:43:32.000Z',
        processing_type: 'initial'
      }
    ],
    source: 'external',
    status: 'approved',
    cash: {
      amount: null,
      charge_back_amount: null
    },
    card_details: {
      card: {
        bin: '41111',
        card_brand: 'visa',
        card_type: 'credit',
        prepaid_type: 'prepaid',
        cardholder_name: 'John Doe',
        customer_id: '12345',
        merchant_id: '12345',
        exp_month: 1,
        exp_year: 2022,
        fingerprint: ' Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.',
        last_4: 'The last 4 digits of the card number.',
        enabled: true,
        billing_address: {
          id: '123',
          type: 'primary',
          string: '25 Spring Street, Blackburn, VIC 3130',
          name: 'HQ US',
          line1: 'Main street',
          line2: 'apt #',
          line3: 'Suite #',
          line4: 'delivery instructions',
          street_number: '25',
          city: 'San Francisco',
          state: 'CA',
          postal_code: '94104',
          country: 'US',
          latitude: '40.759211',
          longitude: '-73.984638',
          county: 'Santa Clara',
          contact_name: 'Elon Musk',
          salutation: 'Mr',
          phone_number: '111-111-1111',
          fax: '122-111-1111',
          email: '[email protected]',
          website: 'https://elonmusk.com',
          notes: 'Address notes or delivery instructions.',
          row_version: '1-12345'
        },
        reference_id: 'card-001',
        version: '230320320320'
      }
    },
    bank_account: {
      bank_name: 'string',
      transfer_type: 'string',
      account_ownership_type: 'string',
      fingerprint: 'string',
      country: 'US',
      statement_description: 'string',
      ach_details: {
        routing_number: 'string',
        account_number_suffix: 'stri',
        account_type: 'string'
      }
    },
    wallet: {
      status: 'authorized'
    },
    external_details: {
      type: 'check',
      source: 'string',
      source_id: 'string',
      source_fee_amount: 2.5
    },
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.paymentsAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Payments

Method: paymentsAll

posApi.paymentsAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetPosPaymentsResponse

HTTP response details

Status code Description
200 PosPayments
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.paymentsAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Payment

Method: paymentsDelete

posApi.paymentsDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeletePosPaymentResponse

HTTP response details

Status code Description
200 PosPayments
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.paymentsDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Payment

Method: paymentsOne

posApi.paymentsOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetPosPaymentResponse

HTTP response details

Status code Description
200 PosPayments
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.paymentsOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Payment

Method: paymentsUpdate

posApi.paymentsUpdate(body)

Parameters

Name Type Description Notes
payment PosPayment
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdatePosPaymentResponse

HTTP response details

Status code Description
200 PosPayments
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  payment: {
    source_id: '12345',
    order_id: '12345',
    merchant_id: '12345',
    customer_id: '12345',
    employee_id: '12345',
    location_id: '12345',
    device_id: '12345',
    tender_id: '12345',
    external_payment_id: '12345',
    idempotency_key: 'random_string',
    amount: 27.5,
    currency: 'USD',
    tip: 7,
    tax: 20,
    total: 37.5,
    app_fee: 3,
    change_back_cash_amount: 20,
    approved: 37.5,
    refunded: 37.5,
    processing_fees: [
      {
        amount: 1.05,
        effective_at: '2020-09-30T07:43:32.000Z',
        processing_type: 'initial'
      }
    ],
    source: 'external',
    status: 'approved',
    cash: {
      amount: null,
      charge_back_amount: null
    },
    card_details: {
      card: {
        bin: '41111',
        card_brand: 'visa',
        card_type: 'credit',
        prepaid_type: 'prepaid',
        cardholder_name: 'John Doe',
        customer_id: '12345',
        merchant_id: '12345',
        exp_month: 1,
        exp_year: 2022,
        fingerprint: ' Intended as a POS-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.',
        last_4: 'The last 4 digits of the card number.',
        enabled: true,
        billing_address: {
          id: '123',
          type: 'primary',
          string: '25 Spring Street, Blackburn, VIC 3130',
          name: 'HQ US',
          line1: 'Main street',
          line2: 'apt #',
          line3: 'Suite #',
          line4: 'delivery instructions',
          street_number: '25',
          city: 'San Francisco',
          state: 'CA',
          postal_code: '94104',
          country: 'US',
          latitude: '40.759211',
          longitude: '-73.984638',
          county: 'Santa Clara',
          contact_name: 'Elon Musk',
          salutation: 'Mr',
          phone_number: '111-111-1111',
          fax: '122-111-1111',
          email: '[email protected]',
          website: 'https://elonmusk.com',
          notes: 'Address notes or delivery instructions.',
          row_version: '1-12345'
        },
        reference_id: 'card-001',
        version: '230320320320'
      }
    },
    bank_account: {
      bank_name: 'string',
      transfer_type: 'string',
      account_ownership_type: 'string',
      fingerprint: 'string',
      country: 'US',
      statement_description: 'string',
      ach_details: {
        routing_number: 'string',
        account_number_suffix: 'stri',
        account_type: 'string'
      }
    },
    wallet: {
      status: 'authorized'
    },
    external_details: {
      type: 'check',
      source: 'string',
      source_id: 'string',
      source_fee_amount: 2.5
    },
    service_charges: [
      {
        name: 'Charge for delivery',
        amount: 27500,
        percentage: 12.5,
        currency: 'USD',
        active: true,
        type: 'auto_gratuity'
      }
    ],
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.paymentsUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Create Tender

Method: tendersAdd

posApi.tendersAdd(body)

Parameters

Name Type Description Notes
tender Tender
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)

Response Type

CreateTenderResponse

HTTP response details

Status code Description
201 Tenders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  tender: {
    key: 'com.clover.tender.cash',
    label: 'Cash',
    active: true,
    hidden: true,
    editable: true,
    opens_cash_drawer: true,
    allows_tipping: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.tendersAdd(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

List Tenders

Method: tendersAll

posApi.tendersAll(body)

Parameters

Name Type Description Notes
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
cursor [string] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional)
limit [number] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetTendersResponse

HTTP response details

Status code Description
200 Tenders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {}

try {
  const { data } = await apideck.pos.tendersAll(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Delete Tender

Method: tendersDelete

posApi.tendersDelete(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

DeleteTenderResponse

HTTP response details

Status code Description
200 Tenders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.tendersDelete(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Get Tender

Method: tendersOne

posApi.tendersOne(body)

Parameters

Name Type Description Notes
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false
fields [string] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
(optional)

Response Type

GetTenderResponse

HTTP response details

Status code Description
200 Tenders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example'
}

try {
  const { data } = await apideck.pos.tendersOne(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]

Update Tender

Method: tendersUpdate

posApi.tendersUpdate(body)

Parameters

Name Type Description Notes
tender Tender
id [string] ID of the record you are acting upon.
consumerId [string] ID of the consumer which you want to get or push data from (optional)
appId [string] The ID of your Unify application (optional)
serviceId [string] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. (optional)
raw [boolean] Include raw response. Mostly used for debugging purposes (optional) defaults to false

Response Type

UpdateTenderResponse

HTTP response details

Status code Description
200 Tenders
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

import { Apideck } from '@apideck/node';

const apideck = new Apideck({
  apiKey: 'REPLACE_WITH_API_KEY',
  appId: 'REPLACE_WITH_APP_ID',
  consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
  id: 'id_example',
  tender: {
    key: 'com.clover.tender.cash',
    label: 'Cash',
    active: true,
    hidden: true,
    editable: true,
    opens_cash_drawer: true,
    allows_tipping: true,
    pass_through: [
      {
        service_id: 'string',
        operation_id: 'string',
        extend_object: {},
        extend_paths: [
          {
            path: '$.nested.property',
            value: [Object]
          }
        ]
      }
    ]
  }
}

try {
  const { data } = await apideck.pos.tendersUpdate(params)
  console.log('API called successfully', data)
} catch (error) {
  console.error(error)
  return error.json()
}

[Back to top] [Back to API list] [Back to README]