Skip to main content

C2A-01 Customers

Lets the tenant backend project a customer identity into Azotte and keep it synchronized. Every other C2A flow (offers, checkout, payment methods, subscriptions) is bound to an Azotte customer record, so this is the first integration step.

Concepts

  • CustomerUrn — Azotte-generated unique resource name (e.g. cu.00.482). Use in every downstream call.
  • ExternalId — your own identifier from the tenant system. Azotte stores it next to the Azotte URN so you can look the customer up by either side.
  • Two-system identity — Azotte never owns customer identity; the tenant system does. Azotte holds an Azotte-side projection used for orchestration.

Base Route

/api/c2a/customer

All endpoints require these request headers:

HeaderRequiredValue
x-api-keyYesTenant API key.
x-tnYesTenant identifier.
Content-TypeYesapplication/json.

Auth policy: JwtTenant + API-key policy. Output content type: application/clientOutput+Json.

Endpoints

#MethodPathPurpose
C2A-01-01POST/api/c2a/customer/validateValidate Customer ExternalId
C2A-01-02POST/api/c2a/customer/storeStore New Customer
C2A-01-03POST/api/c2a/customer/deleteDelete Customer (GDPR)
C2A-01-04POST/api/c2a/customer/updateUpdate Customer
C2A-01-05GET/api/c2a/customer/infoFetch Customer Information

Error Statuses

All responses carry an AzotteStatus. Most relevant for Customers:

HTTPmessageCodeMeaning
200SUCCESSOperation completed.
400BAD_REQUESTNull request.Customer.
400INVALID_REQUESTFluentValidation rule failed (ToAzotteStatus).
401[Authorize(PolicyApiKey)] / JwtTenant rejected. No envelope.
404CUSTOMER_NOT_FOUNDURN / ExternalId did not resolve (fetch / update / delete).
409CUSTOMER_ALREADY_STOREDexternalIdentifier already projected.
409USER_WITH_SAME_EMAIL_EXISTSEmail collides with another tenant customer.
409USER_WITH_SAME_PHONE_NUMBER_EXISTSPhone collides with another tenant customer.
500SQL_DATABASE_FAILUREDB insert returned null.
500INTERNAL_SERVER_ERRORUnhandled exception caught by controller.

Source

  • Controller: Azotte.Api.Gateway.Controllers.C2A.C2A_01_CustomersController
  • Service: Azotte.Customers.ICustomersService
  • DTOs: Azotte.Definitions/Customers/Dto/*
  • Postman: documents/PostmanSamples/C2A API.postman_collection.json