SupplierEdit( object Supplier, bool WebhookEvaluate )
Modify an existing supplier.
Note: Available since RPM 28
Request
Request Data:
- (object) Supplier
- (int) SupplierID (required) – identify the supplier to modify by its ID.
- (string) Supplier (optional) – the supplier’s name.
- (string) Logo (optional) – a base64 PNG image of the supplier’s logo.
- (object) Contact (optional) – the main contact information for the Supplier:
- (string) Salutation (optional) – it can be one these: “Mr”, “Ms”, “Dr”.
- (string) FirstName (optional) – the contact’s first name.
- (string) LastName (optional) – the contact’s last name.
- (string) Title (optional) – the contact’s title or position.
- (string) Email (optional) – the contact’s email.
- (string) Website (optional) – Website url.
- (string) Address (optional) – the main street information section of the Supplier’s address
- (string) City (optional) – the city section of the Supplier’s address
- (string) StateProvince (optional) – the State/Province section of the Supplier’s address
- (string) ZipPostalCode (optional) – the Zip/Postal code section of the Supplier’s address
- (array) PhoneNumbers (optional) – a list of up to 4 phone numbers, each using the following structure:
- (string) Number (optional) – the phone number.
- (enum) Type (optional) – number indicating the type phone number it is:
1-Business, 2-Home, 3-Fax, 6-Other. There cannot be repeated types.
- (array) Fields (optional) – a list of custom fields to fill in for the Supplier, each using the following structure:
- (string) Name (optional) – the custom field name.
- (string) Value (optional) – the value to give the custom field.
- (bool) WebhookEvaluate (optional, default=false) – Whether to fire the supplier.edit webhook.
{
"Supplier": {
"SupplierID": <int>,
"Supplier": <string>,
"Logo": <string>, // base64 encoded image
"Contact": {
"Salutation": <string>,
"FirstName": <string>,
"LastName": <string>,
"Title": <string>,
"Email": <string>,
"Website": <string>,
"Address": <string>,
"City": <string>,
"StateProvince": <string>,
"ZipPostalCode": <string>,
"PhoneNumbers": [
{
"Number": <string>,
"PhoneNumberID": <int>,
"Type": <enum:
1=Business,
2=Home,
3=Fax,
6=Other
>
},
... <More Results>
]
},
"Fields": [
{
"Field": <string>,
"Value": <string>
},
... <More Custom Fields>
],
}
}
Response
Same as the Supplier endpoint
Errors
- “A unique name is required”