PUT
/
external-api
/
v1
/
creditors
/
{id}
Update Creditor
curl --request PUT \
  --url https://getbill.io/external-api/v1/creditors/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "address": "<string>",
  "city": "<string>",
  "postalCode": "<string>",
  "country": "<string>",
  "registrationNumber": "<string>",
  "taxNumber": "<string>",
  "contactPerson": "<string>"
}
'
{
  "error": false,
  "message": "Creditor updated successfully",
  "data": {
    "id": "abc123def456",
    "name": "Acme Corporation Updated",
    "email": "newbilling@acmecorp.com",
    "phone": "+33142123456",
    "address": "123 Business Street",
    "city": "Paris",
    "postalCode": "75001",
    "country": "France",
    "registrationNumber": "B123456789",
    "taxNumber": "FR12345678901",
    "contactPerson": "Jane Doe",
    "createdAt": "2024-01-15 10:30:00",
    "updatedAt": "2024-02-01 15:45:00"
  }
}

Overview

This endpoint allows you to update creditor information. You can use either PUT (full update) or PATCH (partial update) methods.

Authentication

Requires a valid OAuth 2.0 access token with the creditors:write scope.

Request

Authorization
string
required
Bearer token for authentication

Path Parameters

id
string
required
The encrypted creditor ID

Request Body

All fields are optional. Only include the fields you want to update.
name
string
Creditor’s name
email
string
Creditor’s email address
phone
string
Creditor’s phone number
address
string
Creditor’s address
city
string
Creditor’s city
postalCode
string
Creditor’s postal code
country
string
Creditor’s country
registrationNumber
string
Creditor’s company registration number
taxNumber
string
Creditor’s tax number
contactPerson
string
Main contact person for the creditor

Example Request

curl -X PUT "/external-api/v1/creditors/abc123def456" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corporation Updated",
    "email": "newbilling@acmecorp.com",
    "contactPerson": "Jane Doe"
  }'

Response

error
boolean
Always false for successful requests
message
string
Success message (e.g., “Creditor updated successfully”)
data
object
The updated creditor object

Success Response

{
  "error": false,
  "message": "Creditor updated successfully",
  "data": {
    "id": "abc123def456",
    "name": "Acme Corporation Updated",
    "email": "newbilling@acmecorp.com",
    "phone": "+33142123456",
    "address": "123 Business Street",
    "city": "Paris",
    "postalCode": "75001",
    "country": "France",
    "registrationNumber": "B123456789",
    "taxNumber": "FR12345678901",
    "contactPerson": "Jane Doe",
    "createdAt": "2024-01-15 10:30:00",
    "updatedAt": "2024-02-01 15:45:00"
  }
}

Error Responses

{
  "error": true,
  "message": "Validation failed",
  "code": 400,
  "errors": [
    {
      "property": "email",
      "message": "This value is not a valid email address."
    }
  ]
}

Rate Limiting

This endpoint is subject to rate limiting. See the Rate Limits documentation for details. Rate Limit: 1,000 requests per hour