Update a customer

PATCH /customers/{id}

Update details of a specific customer identified by its uinque customer ID, and receive the updated details in return.

Headers

Path parameters

  • id integer(int32) Required

    A unique identifier for the customer within 24SevenOffice CRM.

application/json

Body Required

  • name string | null

    A human-readable name or label for a customer, making it easily identifiable to users.

  • person object

    The first and the last name of a customer if the customer is a person.

    Additional properties are allowed.

    Hide person attributes Show person attributes object
    • firstName string | null

      The first name of a person if the customer is a person.

    • lastName string | null

      The last name of a person if the customer is a person.

  • isSupplier boolean

    A flag variable indicating whether the customer is also a supplier (true) or not (false).

  • organizationNumber string | null

    The organization number issued by authorities, like a VAT number, of the customer if the customer is a company.

  • address object

    Addresses for the customer.

    Additional properties are allowed.

    Hide address attributes Show address attributes object
    • visit object

      The visiting address of the customer.

      Additional properties are allowed.

      Hide visit attributes Show visit attributes object
      • countryCode string | null

        The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

        Maximum length is 2.

      • street string | null

        The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

      • postalCode string | null

        The postal code for the address.

      • postalArea string | null

        The postal area for the address.

      • countrySubdivision string | null

        The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

    • postal object

      The postal address of the customer.

      Additional properties are allowed.

      Hide postal attributes Show postal attributes object
      • street string | null

        The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

      • postalCode string | null

        The postal code for the address.

      • postalArea string | null

        The postal area for the address.

      • countrySubdivision string | null

        The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

    • billing object

      The billing address of the customer.

      Additional properties are allowed.

      Hide billing attributes Show billing attributes object
      • name string | null

        The name for the address.

      • countryCode string | null

        The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

        Maximum length is 2.

      • street string | null

        The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

      • postalCode string | null

        The postal code for the address.

      • postalArea string | null

        The postal area for the address.

      • countrySubdivision string | null

        The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

    • delivery object

      The delivery address of the customer.

      Additional properties are allowed.

      Hide delivery attributes Show delivery attributes object
      • name string | null

        The name for the address.

      • countryCode string | null

        The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

        Maximum length is 2.

      • street string | null

        The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

      • postalCode string | null

        The postal code for the address.

      • postalArea string | null

        The postal area for the address.

      • countrySubdivision string | null

        The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

  • email object

    Email addresses for the customer.

    Additional properties are allowed.

    Hide email attributes Show email attributes object
    • contact string | null

      The email address for contacting the customer.

    • billing string | null

      The billing email address for the customer.

  • phone string | null

    A phone number for contacting the customer.

Responses

  • 200 application/json

    Success

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
    • id integer(int32)

      A unique identifier for the customer within 24SevenOffice CRM. This ID is used for reference and linking transactions to specific customers.

    • name string | null

      A human-readable name or label for a customer, making it easily identifiable to users.

    • person object

      The first and the last name of a customer if the customer is a person.

      Additional properties are allowed.

      Hide person attributes Show person attributes object
      • firstName string | null

        The first name of a person if the customer is a person.

      • lastName string | null

        The last name of a person if the customer is a person.

    • isCompany boolean

      A flag variable indicating whether the customer is a company (true) or a person (false).

    • isSupplier boolean

      A flag variable indicating whether the customer is also a supplier (true) or not (false).

    • organizationNumber string | null

      The organization number issued by authorities, like a VAT number, of the customer if the customer is a company.

    • address object

      Addresses for the customer.

      Additional properties are allowed.

      Hide address attributes Show address attributes object
      • visit object

        The visiting address of the customer.

        Additional properties are allowed.

        Hide visit attributes Show visit attributes object
        • countryCode string | null

          The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

          Maximum length is 2.

        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

      • postal object

        The postal address of the customer.

        Additional properties are allowed.

        Hide postal attributes Show postal attributes object
        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

      • billing object

        The billing address of the customer.

        Additional properties are allowed.

        Hide billing attributes Show billing attributes object
        • name string | null

          The name for the address.

        • countryCode string | null

          The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

          Maximum length is 2.

        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

      • delivery object

        The delivery address of the customer.

        Additional properties are allowed.

        Hide delivery attributes Show delivery attributes object
        • name string | null

          The name for the address.

        • countryCode string | null

          The two-letter country code for the address, as in ISO 3166-1 alpha-2 standard.

          Maximum length is 2.

        • street string | null

          The street for the address. Can contain a street name, building and apartment number, a PO box number, or similar.

        • postalCode string | null

          The postal code for the address.

        • postalArea string | null

          The postal area for the address.

        • countrySubdivision string | null

          The geographical subdivision for the address, like a county ("fylke" in Norway) or a state.

    • email object

      Email addresses for the customer.

      Additional properties are allowed.

      Hide email attributes Show email attributes object
      • contact string | null

        The email address for contacting the customer.

      • billing string | null

        The billing email address for the customer.

    • phone string | null

      A phone number for contacting the customer.

    • A timestamp for when a record was created, in ISO 8601 format.

    • A timestamp for when one of the properties of a record was last modified, in ISO 8601 format.

  • Unauthorized. Missing or invalid bearer token.

    Hide headers attributes Show headers attributes
PATCH /customers/{id}
curl \
 -X PATCH https://rest.api.24sevenoffice.com/v1/customers/{id} \
 -H "Content-Type: application/json" \
 -H "Authorization: string" \
 -d '{"name":"ABC Corporation","person":{"firstName":"John","lastName":"Doe"},"isSupplier":false,"organizationNumber":"123456789","address":{"visit":{"countryCode":"NO","street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","countrySubdivision":"Viken"},"postal":{"street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","countrySubdivision":"Viken"},"billing":{"name":"ABC Corporation","countryCode":"NO","street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","countrySubdivision":"Viken"},"delivery":{"name":"ABC Corporation","countryCode":"NO","street":"Hovedgata 1","postalCode":"0123","postalArea":"Fornebu","countrySubdivision":"Viken"}},"email":{"contact":"contact@example.com","billing":"billing@example.com"},"phone":"+47-12345678"}'
Request examples
# Headers
Authorization: string

# Payload
{
  "name": "ABC Corporation",
  "person": {
    "firstName": "John",
    "lastName": "Doe"
  },
  "isSupplier": false,
  "organizationNumber": "123456789",
  "address": {
    "visit": {
      "countryCode": "NO",
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    },
    "postal": {
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    },
    "billing": {
      "name": "ABC Corporation",
      "countryCode": "NO",
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    },
    "delivery": {
      "name": "ABC Corporation",
      "countryCode": "NO",
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    }
  },
  "email": {
    "contact": "contact@example.com",
    "billing": "billing@example.com"
  },
  "phone": "+47-12345678"
}
Response examples (200)
# Headers
Access-Control-Allow-Origin: string
Access-Control-Allow-Credentials: string
X-Trace-Id: string

# Payload
{
  "id": 12345,
  "name": "ABC Corporation",
  "person": {
    "firstName": "John",
    "lastName": "Doe"
  },
  "isCompany": true,
  "isSupplier": false,
  "organizationNumber": "123456789",
  "address": {
    "visit": {
      "countryCode": "NO",
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    },
    "postal": {
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    },
    "billing": {
      "name": "ABC Corporation",
      "countryCode": "NO",
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    },
    "delivery": {
      "name": "ABC Corporation",
      "countryCode": "NO",
      "street": "Hovedgata 1",
      "postalCode": "0123",
      "postalArea": "Fornebu",
      "countrySubdivision": "Viken"
    }
  },
  "email": {
    "contact": "contact@example.com",
    "billing": "billing@example.com"
  },
  "phone": "+47-12345678",
  "createdAt": "2022-01-01 18:00:00.000Z",
  "modifiedAt": "2023-12-31 18:00:00.000Z"
}