Update a supplier
Update a supplier to your company. Before making a PUT request to update a supplier in your company, you might find it useful to look at the list of available companies.
PUT suppliers/:id?skipCreationInAccountingSystem=false
Request details
The put request will contain all the required information to update a supplier in your company.
Request properties
Property | Type | Description | Optional |
---|---|---|---|
SupplierId | Guid | Unique identifier of the supplier. | No |
Request | Supplier request object | The supplier request to update. | No |
SkipCreationInAccountingSystem | Bool | Flag that allow also to update the supplier in the accounting system. | Yes |
For supplier update request object properties see details.
Example supplier request
{ "company":{ "companyId":"00000000-0000-0000-0000-000000000000" }, "code":"code", "address":{ "streetName":"street", "streetNumber":"number", "city":"city", "postalCode":"postalcode", "country":{ "code":"country code" } }, "payCollectType":{ "code":"code" }, "vatCode":{ "code":"code" }, "name":"name", "vatNumber":"vatnumber", "chamberOfCommerce":"ChamberOfCommerce", "phone":"phone", "fax":"fax", "bankAccounts":[ { "default":true, "externalId":"externalId", "number":"number", "iban":"iban", "bicCode":"biccode", "bankName":"bankname", "nationalBankCode":"nationalbankcode", "country":{ "code":"code" } } ], "PaymentDiscount":{ "PaymentDays":13, "DiscountPercentage":0.00, "DiscountCalculationMethod":"calcuation method", "GeneralLedger":{ "Code":"code" } }, "Number":"number", "PaymentCondition":{ "Code":"code" }, "Email":"email", "Metadata":{ "key1":"value1", "key2":"value2" } }
Response
Upon successful update of a supplier in the Basecone system, a 204 http status code will be returned. If something goes wrong, an error message with failure details will be given together with a suitable http error status code.
Possible error responses
Status code | Error code | Details |
---|---|---|
400 | invalid_request_payload | Update supplier request cannot be null |
400 | invalid_request_payload | Supplier id cannot be empty |
400 | invalid_request_payload | Company id cannot be empty |
400 | invalid_request_payload | The company provided does not exist. |
400 | user_credentials_invalid | Invalid credentials. |
400 | invalid_request_payload | The supplier code provided is invalid. |
400 | invalid_request_payload | The supplier code provided already exists. |
400 | invalid_request_payload | The SubstitutionGeneralLedger code provided is invalid. |
400 | invalid_request_payload | The VatCode value provided is invalid. |
400 | invalid_request_payload | The PaymentCondition DueDays provided is invalid. |
400 | invalid_request_payload | The PaymentCondition provided is invalid. |
400 | invalid_request_payload | The PayCollectType code provided is invalid. |
400 | invalid_request_payload | The AddressCountry code provided is invalid. |
400 | invalid_request_payload | The BankAccount Country code provided is invalid. |
400 | invalid_request_payload | The DiscountCalculationMethod value provided is invalid. |
400 | invalid_request_payload | The PaymentDiscount GeneralLedger provided is invalid. |
400 | invalid_request_payload | Invalid meta data. |
400 | validation_error | Other validation errors from the accounting system |
403 | unauthorized | User does not have access to the company provided. |
400 | invalid_request_payload | Request properties are not valid to perform the requested operation. |
400 | validation_error | One or more properties were not valid |
400 | validation_error | One or more validation errors occurred. |
400 | concurrent_request | The operation failed because the supplier you are trying to change has just been modified by another concurrent request. |
403 | unauthorized | User has no access to the accounting system company. |
403 | unauthorized | User is not allowed to change Bank Account. |