Référentiels véhicule

Créer une marque

Crée une entrée référentielle marque (brandCode, brandLabel, …). displayOrder est optionnel : s'il est omis, le serveur affecte max(displayOrder) + 1.

POST
/provider/vehicles/brands

Authorization

apiKey BROKER_ADMIN, BROKER_USERapiSecret
X-Api-Key<token>

Clé d'API du cabinet (hk_…). Chaque requête porte aussi X-Timestamp, X-Nonce et X-Signature = hex(HMAC-SHA256(secret, keyId + timestamp + nonce + MÉTHODE + chemin avec query + sha256Hex(corps))). Voir le guide Authentification.

In: header

Scope: BROKER_ADMIN, BROKER_USER

X-Api-Secret<token>

Simulateur uniquement : le secret de la clé sert à signer la requête sur le serveur de la documentation. Il n'est jamais envoyé à l'API. N'utilisez que des clés de test.

In: header

Header Parameters

X-Workspace*string

Espace courtier de la plateforme, par exemple broker. Communiqué avec votre compte.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

./centurion-call.sh POST '/provider/vehicles/brands' '{"brandCode":"TVS","brandLabel":"TVS Motor"}'
{
  "id": "string",
  "brandCode": "string",
  "brandLabel": "string",
  "countryOfOrigin": "string",
  "isActive": true,
  "displayOrder": 0,
  "createdDate": "2022-03-10T12:15:50",
  "lastModifiedDate": "2022-03-10T12:15:50",
  "createdBy": {
    "id": "string",
    "username": "string",
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "name": "string",
    "phoneNumber": "string",
    "country": "string",
    "eatciUsername": "string",
    "status": "string",
    "enabled": true,
    "emailVerified": true,
    "company": {
      "id": "string",
      "companyCode": "string",
      "companyNumber": "string",
      "companyLabel": "string",
      "legalName": "string",
      "logoUrl": "string"
    },
    "broker": {
      "id": "string",
      "brokerCode": "string",
      "brokerNumber": "string",
      "legalName": "string",
      "tradeName": "string",
      "isMainOffice": true
    },
    "roles": [
      {
        "id": "string",
        "name": "string",
        "label": "string",
        "description": "string",
        "applicationRole": true,
        "applicationId": "string"
      }
    ],
    "createdDate": "2022-03-10T12:15:50",
    "lastModifiedDate": "2022-03-10T12:15:50",
    "createdBy": {},
    "updatedBy": {}
  },
  "updatedBy": {
    "id": "string",
    "username": "string",
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "name": "string",
    "phoneNumber": "string",
    "country": "string",
    "eatciUsername": "string",
    "status": "string",
    "enabled": true,
    "emailVerified": true,
    "company": {
      "id": "string",
      "companyCode": "string",
      "companyNumber": "string",
      "companyLabel": "string",
      "legalName": "string",
      "logoUrl": "string"
    },
    "broker": {
      "id": "string",
      "brokerCode": "string",
      "brokerNumber": "string",
      "legalName": "string",
      "tradeName": "string",
      "isMainOffice": true
    },
    "roles": [
      {
        "id": "string",
        "name": "string",
        "label": "string",
        "description": "string",
        "applicationRole": true,
        "applicationId": "string"
      }
    ],
    "createdDate": "2022-03-10T12:15:50",
    "lastModifiedDate": "2022-03-10T12:15:50",
    "createdBy": {},
    "updatedBy": {}
  }
}
{
  "status": 404,
  "title": "Élément introuvable",
  "detail": "Contract not found",
  "exception": "CONTRACT_NOT_FOUND",
  "instance": "/api/v1/provider/contracts/abc",
  "details": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 404,
  "title": "Élément introuvable",
  "detail": "Contract not found",
  "exception": "CONTRACT_NOT_FOUND",
  "instance": "/api/v1/provider/contracts/abc",
  "details": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 404,
  "title": "Élément introuvable",
  "detail": "Contract not found",
  "exception": "CONTRACT_NOT_FOUND",
  "instance": "/api/v1/provider/contracts/abc",
  "details": {
    "property1": "string",
    "property2": "string"
  }
}