Create or Update a Supplier

To create a new supplier or update an existing one in the AppZen System. This returns the uuid, the unique identifier, for this supplier.

If there already exists a supplier with the given external_supplier_id body parameter, then the existing supplier will be updated. The status in the response shows as UPDATED.
For a newly created supplier, the status shows as CREATED

Request URI 

POST https://api.appzen.com/dictionary-data-services/
supplier


Header Parameters

Name Type Description Required
x-api-key String The x-api-key provided to authorize the request. Yes
customer-id String The Customer ID provided to authorize the request. Yes
customer-key String  The Customer Key provided to authorize the request. Yes


Body Parameters

Name Type Description Required

supplier_core

NA

This is the root field to hold the supplier information.

Yes

external_supplier_id

Integer

The unique supplier identifier for each supplier in the source system. This is a system-generated id and is usually used internally by the system software.
Example:691759

Yes

supplier_name

String

The name of the supplier.
Example:ABC Suppliers Inc.

Yes

supplier_number

String

The unique supplier number assigned to each supplier in the source system.This is a user-facing number that is used to identify the supplier.

No

web_site

String

The name of the website of the supplier.

No

on_file_1099

String

It will have value Type of 1099 tax code with distribution line.

No

vat_registration_number

String

The VAT registration number of the supplier

No

fed_tax_id

String

Tax_id which will have four digit that you pay to the national government mostly in US.

No

is_active

Boolean

This shows if the supplier is active or not in your System.

No

deactive_date

String

The date of deactivation, in case of a non-active supplier.

No

deactived_by

String

The email address from which the supplier was deactivated.

No

note

String

Note from a supplier.

No

addresses

NA

This is the root field to hold different addresses.

Yes

address_type

String

The type of address.
Example:
REMIT_TO, BILL_TO, SHIP_TO, OFFICE, SUPPLIER_ADDRESS, CUSTOMER_ADDRESS

Yes

address

String

This is the root field to contain information about an address.

No

address_line1

String

The address line 1 of the supplier.

No

address_line2

String

The address line 2 of the supplier.

No

address_line3

String

The address line 3 of the supplier.

No

area_code

String

The area code of the area mentioned in the address of the supplier.

No

city

String

The city of the supplier.

No

company

String

The name of the company to which the supplier belongs.

No

contact

String

The name of the contact person.

No

country

String

The country of the supplier.
Example: US

Yes

country_iso3

String

The Country code of supplier in iso3 format. Ex: USA.

No

email

String

The email id of the supplier.

No

phone

String

The contact number of the supplier.

No

province

String

The province of the supplier.

No

state

String

The state of the supplier.

No

zip

String

The zip code of the supplier.

Yes

site_id

String

The unique number assigned to the supplier's site.

No

site_name

String

The name of the supplier site

No

custom_json

NA

For storing any custom key-value pairs needed by your system.

No

is_active

Boolean

This shows if the supplier is active or not in your System.
Default: true.

No

valid_start_date

String

The valid start date of an entity

The Date should be in UTC format.
Example:2020-11-01T11:01:00Z

No

valid_end_date

String

The valid end date of an entity.

The date should be in UTC format.
Example:2020-11-01T11:01:00Z

No

contacts

NA

This root element holds the contact information of a 3rd party - if we are supposed to contact that supplier by calling a 3rd party.

No

external_contact_id

String

External ID for that contact person

No

first_name

String

First name of that 3rd party contact person.

No

last_name

String

Last name of that 3rd party contact person.

No

email

String

Email Id of that 3rd party contact person.

No

phone_number

String

Phone number of that 3rd party contact person.

No

payment_term_id

String

This value should be unique in the your system to distinguish payment terms.

No

bank_information

NA

The root element that holds the Bank information of the supplier.

No

bank_acct_last4

String

The last 4 digits of the bank account number.

No

routing_number_last4

String

The last 4 digit of the bank routing number.

No

bank_account_name

String

The name on the bank account.

No

bank_account_type

String

The bank account type.

No

custom_json

NA

For storing any custom key-value pairs needed by your system.

No

 

Sample Request

curl -X POST "https://api.appzen.com/dictionary-data-services/supplier" 
    -H "accept: application/json" 
    -H "x-api-key: R7wsFxxxx" 
    -H "customer-id: 1004xxxx" 
    -H "customer-key: 15d1xxxx"
    -H "Content-Type: application/json" 
    -d "{ 
        "supplier_core": 
          {
          "supplier_core": {
          "external_supplier_id": "691759",
          "supplier_name": "ABC Suppliers Inc.",
          "supplier_number": "2342112",
          "web_site": "abcsuppliers.com",
          "on_file_1099": "3DMWWFF",
          "vat_registration_number": "D08J66",
          "fed_tax_id": "GI19E",
          "is_active": true,
          "deactive_date": "2020-11-01T11:01:00Z",
          "deactived_by": "JOHN.DOE@ABC.COM",
          "note": "Category A Supplier"
        },
        "addresses": [
          {
            "address_type": "REMIT_TO",
            "address": {
              "address_line1": "12345 MARKET STREET",
              "address_line2": "SUITE 1234",
              "address_line3": "",
              "area_code": "415",
              "city": "SAN FRANCISCO",
              "company": "Preferred Supplier Inc.",
              "contact": "Jane Doe",
              "country": "US",
              "country_iso3": "USA",
              "email": "janedoe@supplier.com",
              "phone": "4042965282",
              "province": "",
              "state": "CA",
              "zip": "94016"
            },
            "site_id": "913838",
            "site_name": "California HQ",
            "custom_json": {
              "key1": "value1"
            },
            "is_active": true,
            "valid_start_date": "2020-11-01T11:01:00Z",
            "valid_end_date": "2020-11-01T11:01:00Z"
          }
        ],
        "contacts": [
          {
            "external_contact_id": "4266477",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@abc.com",
            "phone_number": "4081234567"
          }
        ],
        "payment_term_id": "652402",
        "bank_information": {
          "bank_acct_last4": "8674",
          "routing_number_last4": "6521",
          "bank_account_name": "ABC Bank",
          "bank_account_type": "Checking"
        },
        "custom_json": {
          "key1": "value1"
        }
      }
    }"

Sample Response

Success

{
  "uuid": "5fc03087-d265-11e7-b8c6-83e29cd24f4c",
  "status": "CREATED"
}

Failure

The request fails if you enter an invalid URL.

{
  "timestamp": "2019-01-17T16:12:45.977+0000",
  "status": 404,
  "error": "Not Found",
  "message": "Error code : 17e3338d - The resource you specified cannot be not found"
}  

Response Code

Response Code Description
200 The request is successful.

400

The request failed due to a malformed request syntax. Check the requested URL, including the parameters.

401

The request failed due to an authorization issue. For example, the Customer Key could be missing or invalid.

403

The request failed due to a permission issue. The x-api key may not have permission to perform the request. 

404

The request failed as the resource is not found. Check the requested URL.

500

The request failed due to an AppZen server issue. 


See Also

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.