Rolodex supplier
const url = 'https://api.shypr.app/rest/crm/suppliers/example/rolodex';const options = { method: 'POST', headers: {'X-API-KEY': '<X-API-KEY>', 'Content-Type': 'application/json'}, body: '{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","version":1,"contacts":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","types":["GENERAL"],"defaultFor":["GENERAL"],"name":"example","email":"hello@example.com","phoneNumber":"example","faxNumber":"example","mobileNumber":"example"}],"addresses":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","types":["BILLING"],"defaultFor":["BILLING"],"name":"example","street":"example","streetNo":"example","city":"example","zip":"example","state":"example","attention":"example","countryName":"example","countryISOAlpha3":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shypr.app/rest/crm/suppliers/example/rolodex \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <X-API-KEY>' \ --data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "version": 1, "contacts": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "types": [ "GENERAL" ], "defaultFor": [ "GENERAL" ], "name": "example", "email": "hello@example.com", "phoneNumber": "example", "faxNumber": "example", "mobileNumber": "example" } ], "addresses": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "types": [ "BILLING" ], "defaultFor": [ "BILLING" ], "name": "example", "street": "example", "streetNo": "example", "city": "example", "zip": "example", "state": "example", "attention": "example", "countryName": "example", "countryISOAlpha3": "example" } ] }'Creates a Supplier resource.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Supplier identifier
Request Bodyrequired
Section titled “Request Bodyrequired”The new Supplier resource
object
The version that the client read, as {@see SupplierUpdateInput::$version}.
The full list of the contacts, as {@see SupplierUpdateInput::$contacts}. Null keeps the current contacts.
object
The types that this contact is the default of, a subset of $types. A type without a default takes its first contact.
Optional: a logistics contact can have only a phone number.
The full list of the addresses, as {@see SupplierUpdateInput::$addresses}. Null keeps the current addresses.
object
The types that this address is the default of, a subset of $types. A type without a default takes its first address.
object
The version that the client read, as {@see SupplierUpdateInput::$version}.
The full list of the contacts, as {@see SupplierUpdateInput::$contacts}. Null keeps the current contacts.
object
The types that this contact is the default of, a subset of $types. A type without a default takes its first contact.
Optional: a logistics contact can have only a phone number.
The full list of the addresses, as {@see SupplierUpdateInput::$addresses}. Null keeps the current addresses.
object
The types that this address is the default of, a subset of $types. A type without a default takes its first address.
Responses
Section titled “Responses”Supplier resource created
object
The contacts. changeContacts() keeps the rules.
The addresses. changeAddresses() keeps the rules.
The contact is the first contact, and it gets the type PURCHASE, as the migration of docs/rolodex.md gave each supplier contact.
The currency of a new quote or purchase order, one of the currencies of the workspace.
object
The currency code. For ISO currencies this will be the 3-letter uppercase ISO 4217 currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes.
The numeric currency code. For ISO currencies this will be the ISO 4217 numeric currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes. Set to null if the currency does not have a numeric code.
The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.
The default number of fraction digits (typical scale) used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it is 0. This cannot be a negative number.
The type of the currency. For ISO currencies, this indicates whether the currency is currently in use (IsoCurrent) or has been withdrawn (IsoHistorical). For non-ISO currencies defined by the application, the type is Custom.
object
True when VIES confirmed the VAT number, false when VIES refused it. Null without a number, and when VIES did not check this number (VIES was down, or a number outside the EU). Only a confirmed number reverse charges the VAT.
When VIES checked the VAT number. Null when it did not.
True when a new record of the company has VAT. The form of a record reads it.
The VAT rate of a new record of the company, the rate of today. A saved record takes the rate of its document date, see VatService.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the fractional part of this decimal number.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
The VAT rate of a line of a reduced product on a new record of the company, the rate of today.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the fractional part of this decimal number.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Example
{ "products": [ "https://example.com/" ], "purchaseOrders": [ "https://example.com/" ], "contacts": [ "https://example.com/" ], "addresses": [ "https://example.com/" ], "type": "SUP", "attachments": [ "https://example.com/" ], "notes": [ "https://example.com/" ], "version": 1}object
The contacts. changeContacts() keeps the rules.
The addresses. changeAddresses() keeps the rules.
The contact is the first contact, and it gets the type PURCHASE, as the migration of docs/rolodex.md gave each supplier contact.
The currency of a new quote or purchase order, one of the currencies of the workspace.
object
The currency code. For ISO currencies this will be the 3-letter uppercase ISO 4217 currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes.
The numeric currency code. For ISO currencies this will be the ISO 4217 numeric currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes. Set to null if the currency does not have a numeric code.
The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.
The default number of fraction digits (typical scale) used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it is 0. This cannot be a negative number.
The type of the currency. For ISO currencies, this indicates whether the currency is currently in use (IsoCurrent) or has been withdrawn (IsoHistorical). For non-ISO currencies defined by the application, the type is Custom.
object
True when VIES confirmed the VAT number, false when VIES refused it. Null without a number, and when VIES did not check this number (VIES was down, or a number outside the EU). Only a confirmed number reverse charges the VAT.
When VIES checked the VAT number. Null when it did not.
True when a new record of the company has VAT. The form of a record reads it.
The VAT rate of a new record of the company, the rate of today. A saved record takes the rate of its document date, see VatService.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the fractional part of this decimal number.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
The VAT rate of a line of a reduced product on a new record of the company, the rate of today.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the fractional part of this decimal number.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Invalid input
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}Forbidden
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}An error occurred
Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}