Update a customer

Update a customer to your company. Before making a PUT request to update a customer in your company, you might find it useful to look at the list of available companies.

PUT customers/:id?skipCreationInAccountingSystem=false

Request details

The put request will contain all the required information to update a customer in your company.

Request properties

Property Type Description Optional
CustomerId Guid Unique identifier of the customer. No
Request Customer request object The customer request to update. No
SkipCreationInAccountingSystem Bool Flag that allow also to update the customer in the accounting system. Yes

For customer update request object properties see details.

Example customer 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"
        }
    }
    ],
    "Number":"number",
    "PaymentCondition":{  
    "Code":"code"
    },
    "Email":"email"
}

Please note that property Code is only available for WKBelgium API clients

Response

Upon successful update of a customer 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 customer request cannot be null
400 invalid_request_payload Customer 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 customer code provided is invalid.
400 invalid_request_payload The customer 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 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 validation_error Other validation errors from the accounting system
400 concurrent_request The operation failed because the customer you are trying to change has just been modified by another concurrent request.
403 unauthorized User does not have access to the company provided.
403 unauthorized User has no access to the accounting system company.
403 unauthorized User is not allowed to change Bank Account.