Suppliers

The Suppliers resource allows Suppliers to be listed, viewed, created, and updated. Here are some example URIs:

  • /Suppliers/E6E8163F-6911-40e9-B740-90E5A0A3A996 - returns details of a particular Supplier;
  • /Suppliers?page=2 - returns the second page of 100 Suppliers;
  • /Suppliers - returns the first 100 active Suppliers because page number 1 is the default;
  • /Suppliers?page=2&limit=500 - returns the second page of 500 Suppliers; i.e. the 501st to 1000th Suppliers;
  • /Suppliers?includeDeprecated=1 - returns the first page of 100 Suppliers including deprecated Suppliers;
  • /Suppliers?name=ABC - returns the first page of 100 Suppliers with name starting with ABC;

The full range of URIs and HTTP Verbs supported are:

OperationHTTP Action
List of paginated SuppliersGET /Suppliers?page={pageNumber}
View any SupplierGET /Suppliers/{id}
Create a set of SuppliersPOST /Suppliers
Update a set of SuppliersPUT /Suppliers

These filters can be used with the GET Suppliers endpoint:

FilterDescription
limitSpecifies the page size for pagination. Default page size is 100 Suppliers.
nameOnly return Suppliers that start with the specific Supplier name
modifiedSinceOnly return Suppliers modified since a specified date (UTC time)
includeDeprecatedReturns all Suppliers, including deprecated, if set to true. If set to false or if it is not specified then returns only active (ie. non-deprecated) Suppliers

Filters are used by adding the filter and value to the URI: /Suppliers?name=ABC&includeDeprecated=true

Using bulk create/update:

With POST and PUT actions you create/update a set of Suppliers:

{ Suppliers: [{...}, {...},...] }

Up to 100 Suppliers can be created/updated in one batch.

As a result of the call to batch actions you will get the following response:

{ "Suppliers": [ { ..., "OperationStatus":"failed", "Errors": [ {"ErrorText":"Supplier with specified id does not exist"}, {"ErrorText":"Supplier name cannot be longer than 256 characters"} ] }, { ..., "OperationStatus":"succeeded", "Errors": [] }, ] }

Where “errors” property for every Supplier in a batch indicates problems with executing create/update action on the Supplier. If “errors” array property has no items then operation completed successfully. You can also check “operationStatus” property to find out if specific action in a batch succeeded or failed.

Available Fields for Supplier:

PropertyTypeLengthRequiredNotes
Addresses (see below)
Contacts (see below)
Errors (see below)
IDGuidIgnored by POST action. Required for PUT action
OperationStatusStringRead-only field. Empty in Get action result and one of two possible values as a result of POST, PUT and DELETE actions: “failed” or “succeeded”
NameString256YesMust be unique
CurrencyString3YesISO code
PaymentTermString50YesValid payment term name (payment term with this name must exist in Payment Terms reference book and should be active)
TaxRuleString50YesValid taxation rule name (taxation rule with this name must exist in Taxation Rules reference book and should have For Purchases flag set to “true” in API)
DiscountNullable DecimalDiscount percentage, applied for all purchases by this supplier by default. Range from 0 to 100
CommentsString256Multiline comment field. Automatically copied to Notes field in sale task when the Supplier is selected.
AccountPayableString50YesAccount code of active account from chart of accounts with Account Payable=true
TaxNumberString256Taxation number of the Supplier used to report to tax authorities
AdditionalAttribute1String256Value of the Supplier’s additional attribute 1. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute2String256Value of the Supplier’s additional attribute 2. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute3String256Value of the Supplier’s additional attribute 3. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute4String256Value of the Supplier’s additional attribute 4. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute5String256Value of the Supplier’s additional attribute 5. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute6String256Value of the Supplier’s additional attribute 6. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute7String256Value of the Supplier’s additional attribute 7. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute8String256Value of the Supplier’s additional attribute 8. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute9String256Value of the Supplier’s additional attribute 9. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AdditionalAttribute10String256Value of the Supplier’s additional attribute 10. Ignored when current Cin7 Core Subscription plan is Small or Medium or when AttributeSet name is not provided.
AttributeSetString50Name of the Supplier’s additional attribute set. Ignored when current Cin7 Core Subscription plan is Small or Medium. (AttributeSet with this name must exist in Additional Attribute Sets reference book)
StatusStringYesThe only valid values are “Active” and “Deprecated”
LastModifiedOnNullable DateTime

Addresses:

PropertyTypeLengthRequiredNotes
Line1String256Yes
Line2String256
TypeString8YesBilling, Shipping or Business
DefaultForTypeBooleanYes“true” if specified address should be used as default for its Type (Shipping). Default addresses are selected by default when Supplier is selected in sale task.
CityString256
StateString256
PostcodeString20
CountryString32Name of the country

Contacts:

PropertyTypeLengthRequiredNotes
NameString256YesContact person’s name
PhoneString50
MobilePhoneString50
JobTitleString256
FaxString50
EmailString256
WebsiteString256
DefaultBooleanYesTrue if this contact is the Supplier’s default contact. Will be selected automatically when the Supplier is selected in sale task.
CommentString256Multiline comment field. Copied to Notes area in sale task when this Supplier is selected.

Errors:

PropertyTypeLengthRequiredNotes
ErrorTextStringRead-only field indicating problem when executing action on associated entity

Was this article helpful?

Have more questions? Submit a request