Skip to content

Instantly share code, notes, and snippets.

@kYann
Created October 11, 2023 17:30
Show Gist options
  • Save kYann/17c85748ea8e092e451228db040d1fc9 to your computer and use it in GitHub Desktop.
Save kYann/17c85748ea8e092e451228db040d1fc9 to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.1",
"info": {
"title": "Bump.Invoice",
"version": "1.0"
},
"paths": {
"/api/b2b-customers/{id}/billing-entities": {
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetBillingEntities",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingEntity"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddBillingEntityToB2BCustomer",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingAddBillingEntityInput"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingEntity"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}": {
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingEntity"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "UpdateBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingAddBillingEntityInput"
}
]
}
},
"text/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingAddBillingEntityInput"
}
]
}
},
"application/*+json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingAddBillingEntityInput"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingEntity"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingEntity"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingEntity"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}/vat-number": {
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "SetVatNumberOnBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "string",
"description": "VAT Number",
"example": "FR12345678910"
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}/users/{userId}": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddUserToBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
}
}
}
}
},
"put": {
"tags": [
"B2BCustomer"
],
"operationId": "SetUserBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteUserFromBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}/vehicles/{vehicleId}": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddVehicleToBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "vehicleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
}
}
}
}
},
"put": {
"tags": [
"B2BCustomer"
],
"summary": "Set the billing entity for the vehicle, replacing any already set billing entity on the vehicle",
"operationId": "SetVehicleBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"description": "",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "vehicleId",
"in": "path",
"description": "",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteVehicleFromBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "vehicleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}/groups/{groupId}": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddGroupToBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToBillingEntityConflict"
}
}
}
}
}
},
"put": {
"tags": [
"B2BCustomer"
],
"operationId": "SetGroupBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteGroupFromBillingEntity",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
{
"name": "groupId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}/billing-address": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "SetBillingEntityBillingAddress",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingAddressInput"
}
]
}
},
"text/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingAddressInput"
}
]
}
},
"application/*+json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingAddressInput"
}
]
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetBillingEntityBillingAddress",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-entities/{billingEntityId}/billing-contact": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "SetBillingEntityBillingContact",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingContactInput"
}
]
}
},
"text/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingContactInput"
}
]
}
},
"application/*+json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingContactInput"
}
]
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetBillingEntityBillingContact",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "billingEntityId",
"in": "path",
"required": true,
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}": {
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetCustomer",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiCustomer"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/billing-address": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "SetBillingAddress",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingAddressInput"
}
]
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetBillingAddress",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiBillingAddress"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/vat-number": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "SetVatNumber",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "string",
"description": "VAT Number",
"example": "FR12345678910"
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/main-billing-contact": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "SetBillingContact",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingSetBillingContactInput"
}
]
}
}
}
},
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/import/drivers-setup/matching": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "ImportDriverSetupUsingMatching",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingImportDriverInput"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingImportDriverResult"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/cost-centers": {
"get": {
"tags": [
"B2BCustomer"
],
"operationId": "GetCostCenters",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/B2BInvoicingApiCostCenter"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddCostCenterToB2BCustomer",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingAddCostCenterInput"
}
]
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/B2BInvoicingApiCostCenter"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/cost-centers/{costCenterId}": {
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/cost-centers/{costCenterId}/users/{userId}": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddUserToCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToCostCenterConflict"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToCostCenterConflict"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToCostCenterConflict"
}
}
}
}
}
},
"put": {
"tags": [
"B2BCustomer"
],
"operationId": "SetUserCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteUserFromCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
},
"/api/b2b-customers/{id}/cost-centers/{costCenterId}/vehicles/{vehicleId}": {
"post": {
"tags": [
"B2BCustomer"
],
"operationId": "AddVehicleToCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "vehicleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToCostCenterConflict"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToCostCenterConflict"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/InvoiceAddItemToCostCenterConflict"
}
}
}
}
}
},
"put": {
"tags": [
"B2BCustomer"
],
"operationId": "SetVehicleCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "vehicleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
},
"delete": {
"tags": [
"B2BCustomer"
],
"operationId": "DeleteVehicleFromCostCenter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "costCenterId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
{
"name": "vehicleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/AspNetCoreProblemDetails"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"AspNetCoreProblemDetails": {
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true
},
"title": {
"type": "string",
"nullable": true
},
"status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"detail": {
"type": "string",
"nullable": true
},
"instance": {
"type": "string",
"nullable": true
}
},
"additionalProperties": {}
},
"B2BInvoicingAddBillingEntityInput": {
"type": "object",
"properties": {
"label": {
"type": "string",
"nullable": true
},
"externalId": {
"type": "string",
"description": "Id used by the b2b customer for his billing entity"
},
"vatNumber": {
"type": "string",
"description": "VAT Number",
"nullable": true,
"example": "FR12345678910"
}
},
"additionalProperties": false
},
"B2BInvoicingAddCostCenterInput": {
"type": "object",
"properties": {
"label": {
"type": "string",
"nullable": true
},
"externalId": {
"type": "string",
"description": "Id used by the b2b customer for his cost center"
}
},
"additionalProperties": false
},
"B2BInvoicingApiBillingAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"address": {
"type": "string"
},
"address2": {
"type": "string",
"nullable": true
},
"companyName": {
"type": "string"
},
"city": {
"type": "string",
"example": "Paris"
},
"postalCode": {
"type": "string",
"nullable": true,
"example": "75015"
},
"countryIsoCode": {
"type": "string",
"example": "FRA"
}
},
"additionalProperties": false
},
"B2BInvoicingApiBillingEntity": {
"type": "object",
"properties": {
"id": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
},
"externalId": {
"type": "string",
"description": "Id used by the b2b customer for his billing entity"
},
"label": {
"type": "string",
"nullable": true
},
"billingAddress": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingApiBillingAddress"
}
],
"nullable": true
},
"vatNumber": {
"type": "string",
"description": "VAT Number",
"nullable": true,
"example": "FR12345678910"
},
"userIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"vehicleIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"groupIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
},
"additionalProperties": false
},
"B2BInvoicingApiCostCenter": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"externalId": {
"type": "string",
"description": "Id used by the b2b customer for his cost center"
},
"label": {
"type": "string",
"nullable": true
},
"userIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"vehicleIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
},
"additionalProperties": false
},
"B2BInvoicingApiCustomer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"name": {
"type": "string"
},
"mainGroupId": {
"type": "string",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"vatNumber": {
"type": "string",
"description": "VAT Number",
"nullable": true,
"example": "FR12345678910"
},
"billingAddress": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingApiBillingAddress"
}
],
"nullable": true
}
},
"additionalProperties": false
},
"B2BInvoicingBillingEntityId": {
"type": "string",
"additionalProperties": false,
"description": "Generated Id for the billing entity",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"B2BInvoicingImportDriverError": {
"type": "object",
"properties": {
"type": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingImportDriverItemErrorType"
}
]
},
"message": {
"type": "string"
}
},
"additionalProperties": false
},
"B2BInvoicingImportDriverErrorType": {
"enum": [
"B2BCustomerNotFound"
],
"type": "string"
},
"B2BInvoicingImportDriverInput": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/B2BInvoicingImportDriverItem"
}
}
},
"additionalProperties": false
},
"B2BInvoicingImportDriverItem": {
"type": "object",
"properties": {
"driverEmail": {
"type": "string",
"format": "email",
"example": "user@company.com"
},
"externalCostCenterId": {
"type": "string",
"description": "Id used by the b2b customer for his cost center",
"nullable": true
},
"billingEntityLabel": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"B2BInvoicingImportDriverItemErrorType": {
"enum": [
"UserNotFound",
"CostCenterNotFound",
"BillingEntityNotFound"
],
"type": "string"
},
"B2BInvoicingImportDriverItemResult": {
"type": "object",
"properties": {
"driverEmail": {
"type": "string",
"format": "email",
"example": "user@company.com"
},
"succeeded": {
"type": "boolean"
},
"error": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingImportDriverError"
}
],
"nullable": true
},
"type": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingImportDriverItemResultType"
}
],
"nullable": true
}
},
"additionalProperties": false
},
"B2BInvoicingImportDriverItemResultType": {
"enum": [
"Created",
"Updated"
],
"type": "string"
},
"B2BInvoicingImportDriverResult": {
"type": "object",
"properties": {
"succeeded": {
"type": "boolean"
},
"errorType": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingImportDriverErrorType"
}
],
"nullable": true
},
"itemResults": {
"type": "array",
"items": {
"$ref": "#/components/schemas/B2BInvoicingImportDriverItemResult"
}
}
},
"additionalProperties": false
},
"B2BInvoicingSetBillingAddressInput": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"address2": {
"type": "string",
"nullable": true
},
"companyName": {
"type": "string"
},
"city": {
"type": "string",
"example": "Paris"
},
"postalCode": {
"type": "string",
"nullable": true,
"example": "75015"
},
"countryIsoCode": {
"type": "string",
"example": "FRA"
}
},
"additionalProperties": false
},
"B2BInvoicingSetBillingContactInput": {
"type": "object",
"properties": {
"fullName": {
"type": "string",
"nullable": true
},
"email": {
"type": "string",
"format": "email",
"nullable": true,
"example": "user@company.com"
},
"phoneNumber": {
"type": "string",
"nullable": true,
"example": "+33123456789"
}
},
"additionalProperties": false
},
"InvoiceAddItemToBillingEntityConflict": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"billingEntityId": {
"allOf": [
{
"$ref": "#/components/schemas/B2BInvoicingBillingEntityId"
}
],
"description": "Generated Id for the billing entity"
}
},
"additionalProperties": false
},
"InvoiceAddItemToCostCenterConflict": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"costCenterId": {
"type": "string",
"description": "Generated Id for the cost center",
"format": "uuid",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
"additionalProperties": false
}
},
"securitySchemes": {
"Bearer": {
"type": "http",
"description": "Bearer token to access rest API (use applications/authenticate to retrieve it).",
"scheme": "bearer"
}
}
},
"security": [
{
"Bearer": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment