Contact.GetById

Try it in Swagger

Endpoint

Returns a single contact by code. When customerCode is omitted, lookup is scoped to the authenticated user's account. A contact flagged to limit search to their own orders can only retrieve their own record on that account unless they are an account administrator.

Account administrators can retrieve a contact on a bill-to account listed in AdditionalWebAccess by supplying customerCode. Master contacts (configured MasterContactCode for the tenant, with API key) can retrieve a contact under any account by supplying customerCode. Use the same customerCode that was sent on Create/Update; contact code is unique per account, not globally.

Request Schema

Headers

Header Required Notes
X-Api-Key Required when tenant is not resolved by subdomain Resolves the tenant/customer database. Also required for master-contact elevation.
Authorization: Bearer {token} Required for authorized endpoints Get a token from Auth/Token or Session/Create.

Path Parameters

Field Type Required Notes
code int Yes Contact code (primary key within the account).

Query Parameters

Parameter Type Required Default Notes
customerCode string No Target account. When omitted, uses the caller's CustomerCode claim. Required when the contact belongs to a different account than the token. A different account requires master contact access, or an account administrator whose allowed set includes that code.

Expected Response Schema

Status Codes

Status Notes
200 OK Contact found and returned.
404 Not Found No contact with that code is visible to the caller on the target account.

Success Body

Response type: ContactLookupDto (see GetAll for fields).