Référentiels véhicule

Créer un modèle

Crée une entrée référentielle modèle liée à une marque (brandId).

POST
/provider/vehicles/models

Authorization

bearerAuth COMPANY_ADMIN, BROKER_ADMIN, SOUSCRIPTEUR, BROKER_USER, DATA_ENTRY_AGENT
AuthorizationBearer <token>

Jeton obtenu via POST /provider/token. Les valeurs listées par opération sont les rôles acceptés.

In: header

Scope: COMPANY_ADMIN, BROKER_ADMIN, SOUSCRIPTEUR, BROKER_USER, DATA_ENTRY_AGENT

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

curl -X POST "https://apigw-pp.pooltpv.app/subscription/api/v1/provider/vehicles/models" \  -H "Content-Type: application/json" \  -d '{    "modelCode": "STAR",    "modelLabel": "Star City",    "brandId": "uuid-marque"  }'
{
  "id": "string",
  "modelCode": "string",
  "modelLabel": "string",
  "brandId": "string",
  "startYear": 0,
  "endYear": 0,
  "isActive": true,
  "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": {}
  },
  "brand": {
    "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"
  }
}