Skip to content

Rolodex supplier

POST
/rest/crm/suppliers/{id}/rolodex
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.

id
required
string

Supplier identifier

The new Supplier resource

object
id

More information

string format: uuid
version

The version that the client read, as {@see SupplierUpdateInput::$version}.

integer | null
> 0
contacts

The full list of the contacts, as {@see SupplierUpdateInput::$contacts}. Null keeps the current contacts.

Array<object> | null
>= 1 items <= 50 items
object
id
string | null format: uuid
types
Array<string>
>= 1 items
Allowed values: GENERAL SALES FINANCE PURCHASE LOGISTICS
defaultFor

The types that this contact is the default of, a subset of $types. A type without a default takes its first contact.

Array<string>
Allowed values: GENERAL SALES FINANCE PURCHASE LOGISTICS
name
required
string
<= 255 characters
email

Optional: a logistics contact can have only a phone number.

More information

string | null format: email
<= 255 characters
phoneNumber
string | null
faxNumber
string | null
mobileNumber
string | null
addresses

The full list of the addresses, as {@see SupplierUpdateInput::$addresses}. Null keeps the current addresses.

Array<object> | null
>= 1 items <= 50 items
object
id
string | null format: uuid
types
Array<string>
>= 1 items
Allowed values: BILLING SHIPPING PICKUP VISITING
defaultFor

The types that this address is the default of, a subset of $types. A type without a default takes its first address.

Array<string>
Allowed values: BILLING SHIPPING PICKUP VISITING
name
required
string
>= 1 characters <= 255 characters
street
required
string
>= 1 characters <= 255 characters
streetNo
string | null
<= 30 characters
city
required
string
>= 1 characters <= 100 characters
zip
required
string
>= 1 characters <= 20 characters
state
string | null
<= 30 characters
attention
string | null
<= 400 characters
countryName
string | null
<= 80 characters
countryISOAlpha3
required
string
fullAddress
string

Supplier resource created

object
products
Array<string>
purchaseOrders
Array<string>
contacts

The contacts. changeContacts() keeps the rules.

Array<string>
addresses

The addresses. changeAddresses() keeps the rules.

Array<string>
type

The contact is the first contact, and it gets the type PURCHASE, as the migration of docs/rolodex.md gave each supplier contact.

string
Allowed values: SUP MAN
archivedAt
string | null format: date-time
vatNumber
string | null
preferredCurrency

The currency of a new quote or purchase order, one of the currencies of the workspace.

Any of:
object
currencyCode

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.

string
numericCode

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.

integer | null
name

The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.

string
defaultFractionDigits

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.

integer
currencyType

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
name
string
name
string
reference
string
attachments
Array<string>
createdAt
string format: date-time
updatedAt
string | null format: date-time
id

More information

string format: uuid
uid
string
notes
Array<string>
supplierType
string
archived
boolean
version
integer
default: 1
vatNumberValid

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.

boolean | null
vatNumberCheckedAt

When VIES checked the VAT number. Null when it did not.

string | null format: date-time
shouldIncludeTaxes

True when a new record of the company has VAT. The form of a record reads it.

boolean
taxRate

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
scale

The scale (number of digits after the decimal point) of this decimal number.

integer
sign
integer
unscaledValue

Returns the unscaled value of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
precision

Returns the number of significant digits in the number.

integer
integralPart

Returns the integral part of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
fractionalPart

Returns the fractional part of this decimal number.

object
scale

The scale (number of digits after the decimal point) of this decimal number.

integer
sign
integer
unscaledValue

Returns the unscaled value of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
precision

Returns the number of significant digits in the number.

integer
integralPart

Returns the integral part of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
fractionalPart
object recursive
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
reducedTaxRate

The VAT rate of a line of a reduced product on a new record of the company, the rate of today.

object
scale

The scale (number of digits after the decimal point) of this decimal number.

integer
sign
integer
unscaledValue

Returns the unscaled value of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
precision

Returns the number of significant digits in the number.

integer
integralPart

Returns the integral part of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
fractionalPart

Returns the fractional part of this decimal number.

object
scale

The scale (number of digits after the decimal point) of this decimal number.

integer
sign
integer
unscaledValue

Returns the unscaled value of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
precision

Returns the number of significant digits in the number.

integer
integralPart

Returns the integral part of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
fractionalPart
object recursive
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean

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
}

Invalid input

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

Forbidden

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

An error occurred

Unprocessable entity

object
status
integer
default: 422
violations
Array<object>
object
propertyPath
required

The property path of the violation

string
message
required

The message associated with the violation

string
code

The code of the violation

string
hint

An extra hint to understand the violation

string
payload

The serialized payload of the violation

object
key
additional properties
any
detail
string
type
string
title
string | null
instance
string | null

Example

{
"status": 422
}