Skip to main content

Sale API - Apigee (1.10.0)

Download OpenAPI specification:Download

Sale API documentation

Authentication & Authorization

You will need to be identified before calling any endpoints.

In order to be recognized and authorized to access our Sale API, we put in place 2 mechanisms:

  • Authentication mechanism is done with a client id dedicated to you.
    Remember that the client id provided should be shared with care.
    The client id must be inserted in the header of the request in the appropriate field
  • Authorization mechanism is done by a well-known authorization flow for REST Web API: Basic auth flow.

Sales

Sales operation with all operation types

Get Sales data

Get sales data filtered by parameters

Authorizations:
(OAuth2ApiKeyAuth)
query Parameters
pageNumber
integer <int32> (PageNumberParam) [ 1 .. 1000 ]
Default: 1
Example: pageNumber=2

The page number

pageSize
integer <int32> (PageSizeParam) [ 1 .. 1000 ]
Default: 1000
Example: pageSize=2

The page size

lastModifiedDateFrom
string <date-time> (lastModifiedDateFromParam)
Example: lastModifiedDateFrom=2024-05-02T10:00:00

Date from for last update date of data

lastModifiedDateTo
string <date-time> (lastModifiedDateToParam)
Example: lastModifiedDateTo=2024-05-02T10:00:00

Date to for last update date of data

externalRef
string (ExternalRefQueryParam) <= 255 characters
Example: externalRef=1000045

Identifier of the external reference

source
string (SourceQueryParam) <= 255 characters
Example: source=GENES

Source of the external reference

withExternalRef
boolean (WithExternalRefQueryParam)
Default: false
Example: withExternalRef=true

Return the external reference if set to true

billToCode
integer <int32> (BillToCode)
Example: billToCode=1000001

Bill to code of the sale

customerType
string (CustomerType)
Enum: "B2B" "B2C"

Customer type of the sale

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "sales": [
    ]
}

Create sale data

Create sale

Authorizations:
(OAuth2ApiKeyAuth)
Request Body schema: application/json
externalRef
required
string (ExternalRef) <= 255 characters

Source application code of the sale

billToExternalRef
string <= 255 characters

External ref of the bill to

sellerExternalRef
string (SellerExternalRef) <= 255 characters

External ref of the seller

vehicleExternalRef
string <= 255 characters

External ref of the vehicle

invoiceDocumentExternalRef
string (InvoiceDocumentExternalRef) <= 255 characters

The external reference of the invoice document

date
string <date-time> (SaleDate)

Date of the sale

currency
string (CurrencyEnum)
Enum: "EUR" "GBP" "CHF" "SEK" "DKK" "CZK" "HUF" "PLN" "RON" "BGN"
amountInclVat
number <float> (AmountInclVat)

Total amount of the sale including VAT

amountExclVat
number <float> (AmountExclVat)

Total amount of the sale without VAT

customerType
string (CustomerType)
Enum: "B2B" "B2C"
Array of objects (CreateSaleLineQueryDTO)

List of lines of the sale

Responses

Request samples

Content type
application/json

Create a sale with the given information

{
  • "externalRef": "12345",
  • "billToExternalRef": "AA123",
  • "sellerExternalRef": "IUA829",
  • "vehicleExternalRef": "UYT9182",
  • "date": "2024-10-10T17:31:00",
  • "currency": "EUR",
  • "amountInclVat": "100",
  • "amountExclVat": "95.5",
  • "invoiceDocumentExternalRef": "GJ3040384",
  • "customerType": "B2C",
  • "lines": [
    ]
}

Response samples

Content type
application/json
{
  • "code": "1000293"
}

Get invoice document for a specific sale

Get invoice document for a specific sale

Authorizations:
(OAuth2ApiKeyAuth)
path Parameters
code
required
integer <int32> (SaleCode)
Example: 1000001

Targeted sale code

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

JobsReports

JobsReports operation with all operation types

Generate a PDF report making a comparison between the inspections pre-job and post job

This report will be used for transactional business to show to the customers the state of the vehicle before and after the job is done.

Authorizations:
(OAuth2ApiKeyAuth)
path Parameters
jobCode
required
integer <int64> (JobCode)
Example: 1000001

Refers to a Job (code of the Job)

query Parameters
language
string (languageQueryParam) <= 255 characters
Example: language=fr-FR

Language using ISO 639 and ISO 3166

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

SerialNumbers

Serial numbers operation

Add a new serial number to the referential

Add a new serial number to the referential. Force the serialNumber format to UPPER case and delete special characters and spaces.

Authorizations:
(OAuth2ApiKeyAuth)
Request Body schema: application/json
serialNumber
required
string (SerialNumber) <= 255 characters

Serial number of the tyre

articleCode
required
integer <int64> (ArticleCodeInt64)

Unique identifier of the article

posCode
required
integer <int64> (PosCode)

Unique identifier of the pos

Responses

Request samples

Content type
application/json

Create a serial number

{
  • "serialNumber": "9P45354010101",
  • "articleCode": 100001,
  • "posCode": 100001
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Get all known serial numbers

Get all known serial numbers

Authorizations:
(OAuth2ApiKeyAuth)
query Parameters
articleCode
integer <int64> (ArticleCodeInt64)
Example: articleCode=1000001

Code of the tyre article

posCode
integer <int64> (PosCode)
Example: posCode=1000001

Code of the pos where the tyre has been viewed

serialNumber
required
string (SerialNumberQueryParam) [ 3 .. 255 ] characters
Example: serialNumber=9P45354010101

Search string using a like (3 characters minimum)

pageNumber
integer <int32> (PageNumberParam) [ 1 .. 1000 ]
Default: 1
Example: pageNumber=2

The page number

pageSize
integer <int32> (PageSizeParam) [ 1 .. 1000 ]
Default: 1000
Example: pageSize=2

The page size

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "serialNumbers": [
    ]
}

Delete a serial number

Delete a serial number

Authorizations:
(OAuth2ApiKeyAuth)
path Parameters
serialNumber
required
string (SerialNumberQueryParam) [ 3 .. 255 ] characters
Example: 9P45354010101

Refers to a serial number

query Parameters
posCode
integer <int64> (PosCode)
Example: posCode=1000001

Refers to a pos code

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Jobs

Create a job

Create a job

Authorizations:
(OAuth2ApiKeyAuth)
Request Body schema: application/json
contractorCode
required
integer <int32> (PartyCode)

Unique identifier of the party

customerCode
required
integer <int32> (PartyCode)

Unique identifier of the party

customerSiteCode
integer <int32> (SiteCode)

Unique identifier of the site

subscriptionCode
integer <int32> (SubscriptionCode)

Unique identifier of the subscription

serviceProviderSiteCode
integer <int32> (SiteCode)

Unique identifier of the site

customerPurchaseOrderNumber
string (CustomerPurchaseOrderNumber) <= 255 characters

Customer purchase order number

contractorPurchaseOrderNumber
string (ContractorPurchaseOrderNumber) <= 255 characters

Purchase order Number when the contractor purchase the job execution to a service provider

vehicleCode
integer <int32> (VehicleCode)

Unique identifier of the vehicle

initialStateCode
integer <int32> (InspectionCode)

Unique identifier of the inspection

finalStateCode
integer <int32> (InspectionCode)

Unique identifier of the inspection

scheduledDate
string <date> (ScheduledDate)

Scheduled date of the job execution

executionDate
string <date> (ExecutionDate)

Execution date of the job

dueDateCode
integer <int32> (DueDateCode)

Due date code

executionSiteCode
integer <int32> (ExecutionSiteCode)

Execution site code

executionLocation
string (ExecutionLocation) <= 255 characters

The location of the execution

mileage
integer <int32> (Mileage)

Mileage of the vehicle

mileageUOM
string (MileageUOM)
Enum: "km" "mi"

Unit of measurement of the mileage

workingHours
integer <int32> (WorkingHours)

Working hours of the vehicle while inspecting

status
required
string (JobStatus)
Enum: "INITIALIZED" "DRAFTED" "TO_BE_EXECUTED" "EXECUTED" "CLOSED" "CANCELLED"

Status of the job

Array of objects (JobItemQueryDTO)
defectToCancelCodes
Array of integers <int64> [ items <int64 > ]

List of codes referencing to cancelled defects

voucherCode
string (VoucherCode) <= 255 characters

Voucher code for the job execution

driverCode
integer <int64> (ContactCode)

Unique identifier of the contact

object (JobSellingPrices)
currency
string (CurrencyEnum)
Enum: "EUR" "GBP" "CHF" "SEK" "DKK" "CZK" "HUF" "PLN" "RON" "BGN"

Responses

Request samples

Content type
application/json

Create a job with the given information

{
  • "contractorCode": "100176",
  • "customerCode": "100176",
  • "customerSiteCode": "100001",
  • "subscriptionCode": "100178",
  • "serviceProviderSiteCode": "100176",
  • "customerPurchaseOrderNumber": "BA123889",
  • "contractorPurchaseOrderNumber": "BA123889",
  • "vehicleCode": "100176",
  • "initialStateCode": "100878",
  • "finalStateCode": "100345",
  • "scheduledDate": "2024-03-01",
  • "executionDate": "2024-03-03",
  • "dueDateCode": "100178",
  • "executionSiteCode": "100179",
  • "executionLocation": "45.759971, 3.128251",
  • "mileage": 120000,
  • "mileageUOM": "km",
  • "workingHours": 300,
  • "status": "INITIALIZED",
  • "voucherCode": "VOUCH123",
  • "sellingPrices": {
    },
  • "currency": "EUR",
  • "items": [
    ],
  • "defectToCancelCodes": [
    ],
  • "driverCode": 100176
}

Response samples

Content type
application/json
{
  • "code": "100001"
}

Get Jobs data

List all the jobs where the service provider site belong to the preferred sites list defined for the user.

Authorizations:
(OAuth2ApiKeyAuth)
query Parameters
customerCode
integer <int64> (PartyCodeQueryParam)
Example: customerCode=1000001

Filters by the customer code (corresponds to the party code in the Party repository).

customerFunctionalRef
string (CustomerFunctionalRefQueryParam) <= 255 characters
Example: customerFunctionalRef=B60123455

Filters by the customer functional reference (corresponds to the party functional_ref in the Party repository).

executionDateFrom
string <date> (ExecutionDateQueryParam)
Example: executionDateFrom=2028-09-10

Filters by the start of the actual execution date range (inclusive).

executionDateTo
string <date> (ExecutionDateQueryParam)
Example: executionDateTo=2028-09-10

Filters by the end of the actual execution date range (inclusive).

extendedMode
boolean (ExtendedModeQueryParam)
Default: false
Example: extendedMode=true

Returns all jobs for the user party network. If false, returns only jobs for the user preferred sites.

lastModifiedDateFrom
string <date-time> (lastModifiedDateFromParam)
Example: lastModifiedDateFrom=2024-05-02T10:00:00

Filters last modified on or after this date. Supports 'YYYY-MM-DDThh:mm:ss' format.

lastModifiedDateTo
string <date-time> (lastModifiedDateToParam)
Example: lastModifiedDateTo=2024-05-02T10:00:00

Filters last modified on or before this date. Supports 'YYYY-MM-DDThh:mm:ss' format.

pageNumber
integer <int32> (PageNumberParam) [ 1 .. 1000 ]
Default: 1
Example: pageNumber=2

The page number

pageSize
integer <int32> (PageSizeParam) [ 1 .. 1000 ]
Default: 1000
Example: pageSize=2

The page size

scheduledDateFrom
string <date> (ScheduledDateQueryParam)
Example: scheduledDateFrom=2028-09-10

Filters by the start of the scheduled execution date range (inclusive).

scheduledDateTo
string <date> (ScheduledDateQueryParam)
Example: scheduledDateTo=2028-09-10

Filters by the end of the scheduled execution date range (inclusive).

siteCode
integer <int64> (SiteCodeQueryParam)
Example: siteCode=1000001

Filters by the vehicle site code (corresponds to the site code in the Site repository).

status
Array of strings (JobStatusQueryParam)
Default: ["INITIALIZED","DRAFTED","TO_BE_EXECUTED","EXECUTED","CLOSED","CANCELLED"]
Items Enum: "INITIALIZED" "DRAFTED" "TO_BE_EXECUTED" "EXECUTED" "CLOSED" "CANCELLED"
Example: status=INITIALIZED&status=TO_BE_EXECUTED

By default, all statuses are returned, but one or more specific statuses can be specified for filtering.

withExtension
boolean (WithExtensionQueryParam)
Default: false
Example: withExtension=true

Whether to include the extension data

customerName
string (CustomerNameQueryParam) <= 255 characters
Example: customerName=Logistic AB

Customer name, search string using a like

customerVehicleReference
string (CustomerVehicleReferenceQueryParam) <= 255 characters
Example: customerVehicleReference=1040

Customer vehicle reference, search string using a like

registrationNumber
string (RegistrationNumberQueryParam) <= 255 characters
Example: registrationNumber=XX-123-YY

Registration number, search string using a like. Special characters and spaces ignored

serviceProviderSiteName
string (ServiceProviderSiteNameQueryParam) <= 255 characters
Example: serviceProviderSiteName=ERM Corbas

Service provider site name, search string using a like

vehicleCode
integer <int64> (VehicleCodeQueryParam)
Example: vehicleCode=1000001

The vehicle's code

Responses

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "jobs": [
    ]
}

Get a job

Get a job if the service provider site belong to the preferred sites list defined for the user.

Authorizations:
(OAuth2ApiKeyAuth)
path Parameters
jobCode
required
integer <int64> (JobCode)
Example: 1000001

Targeted job code

query Parameters
withExtension
boolean (WithExtensionQueryParam)
Default: false
Example: withExtension=true

Whether to include the extension data

Responses

Response samples

Content type
application/json
{
  • "code": "1000001",
  • "contractorCode": "100176",
  • "customerCode": "100176",
  • "driverCode": "100176",
  • "customerSiteCode": "100001",
  • "subscriptionCode": "100178",
  • "serviceProviderSiteCode": "100176",
  • "customerPurchaseOrderNumber": "BA123889",
  • "contractorPurchaseOrderNumber": "BA123889",
  • "vehicleCode": "100176",
  • "initialStateCode": "100878",
  • "finalStateCode": "100345",
  • "scheduledDate": "2024-11-15T10:00:00",
  • "executionDate": "2024-11-20T15:30:00",
  • "dueDateCode": "100178",
  • "executionSiteCode": "100179",
  • "executionLocation": "123 Main St, Cityville",
  • "mileage": 15000,
  • "mileageUOM": "KM",
  • "workingHours": 300,
  • "status": "COMPLETED",
  • "items": [
    ],
  • "defectToFixCodes": [
    ],
  • "defectToCancelCodes": [
    ],
  • "lastModifiedDate": "2024-12-27T12:23:23",
  • "lastModifiedBy": "api_user",
  • "extensions": {
    }
}

Update a job

Update an existing job. This PUT functions like a PATCH (partial update is possible).If status is TO_BE_EXECUTED, EXECUTED or CLOSED we need to manage the remaining defects.

Authorizations:
(OAuth2ApiKeyAuth)
path Parameters
jobCode
required
integer <int64> (JobCode)
Example: 1000001

Targeted job code

Request Body schema: application/json
contractorCode
required
integer <int32> (PartyCode)

Unique identifier of the party

customerCode
required
integer <int32> (PartyCode)

Unique identifier of the party

customerSiteCode
integer <int32> (SiteCode)

Unique identifier of the site

subscriptionCode
integer <int32> (SubscriptionCode)

Unique identifier of the subscription

serviceProviderSiteCode
integer <int32> (SiteCode)

Unique identifier of the site

customerPurchaseOrderNumber
string (CustomerPurchaseOrderNumber) <= 255 characters

Customer purchase order number

contractorPurchaseOrderNumber
string (ContractorPurchaseOrderNumber) <= 255 characters

Purchase order Number when the contractor purchase the job execution to a service provider

vehicleCode
integer <int32> (VehicleCode)

Unique identifier of the vehicle

initialStateCode
integer <int32> (InspectionCode)

Unique identifier of the inspection

finalStateCode
integer <int32> (InspectionCode)

Unique identifier of the inspection

scheduledDate
string <date> (ScheduledDate)

Scheduled date of the job execution

executionDate
string <date> (ExecutionDate)

Execution date of the job

dueDateCode
integer <int32> (DueDateCode)

Due date code

executionSiteCode
integer <int32> (ExecutionSiteCode)

Execution site code

executionLocation
string (ExecutionLocation) <= 255 characters

The location of the execution

mileage
integer <int32> (Mileage)

Mileage of the vehicle

mileageUOM
string (MileageUOM)
Enum: "km" "mi"

Unit of measurement of the mileage

workingHours
integer <int32> (WorkingHours)

Working hours of the vehicle while inspecting

status
required
string (JobStatus)
Enum: "INITIALIZED" "DRAFTED" "TO_BE_EXECUTED" "EXECUTED" "CLOSED" "CANCELLED"

Status of the job

Array of objects (JobItemQueryDTO)
defectToCancelCodes
Array of integers <int64> [ items <int64 > ]

List of codes referencing to cancelled defects

voucherCode
string (VoucherCode) <= 255 characters

Voucher code for the job execution

driverCode
integer <int64> (ContactCode)

Unique identifier of the contact

object (JobSellingPrices)
currency
string (CurrencyEnum)
Enum: "EUR" "GBP" "CHF" "SEK" "DKK" "CZK" "HUF" "PLN" "RON" "BGN"

Responses

Request samples

Content type
application/json
{
  • "contractorCode": 100176,
  • "customerCode": 100176,
  • "customerSiteCode": 100001,
  • "subscriptionCode": 100178,
  • "serviceProviderSiteCode": 100176,
  • "customerPurchaseOrderNumber": "BA123889",
  • "contractorPurchaseOrderNumber": "BA123889",
  • "vehicleCode": 100176,
  • "initialStateCode": 100878,
  • "finalStateCode": 100345,
  • "scheduledDate": "2024-03-01",
  • "executionDate": "2024-03-03",
  • "dueDateCode": 100178,
  • "executionSiteCode": 100179,
  • "executionLocation": "45.759971, 3.128251",
  • "mileage": 120000,
  • "mileageUOM": "km",
  • "workingHours": 300,
  • "status": "INITIALIZED",
  • "items": [
    ],
  • "defectToCancelCodes": [
    ],
  • "driverCode": 100176
}

Response samples

Content type
application/json
{
  • "code": 100001,
  • "contractorCode": 100176,
  • "customerCode": 100176,
  • "customerSiteCode": 100001,
  • "subscriptionCode": 100178,
  • "serviceProviderSiteCode": 100176,
  • "customerPurchaseOrderNumber": "BA123889",
  • "contractorPurchaseOrderNumber": "BA123889",
  • "vehicleCode": 100176,
  • "initialStateCode": 100878,
  • "finalStateCode": 100345,
  • "scheduledDate": "2024-03-01",
  • "executionDate": "2024-03-03",
  • "dueDateCode": 100178,
  • "executionSiteCode": 100179,
  • "executionLocation": "45.759971, 3.128251",
  • "mileage": 120000,
  • "mileageUOM": "km",
  • "workingHours": 300,
  • "status": "INITIALIZED",
  • "items": [
    ],
  • "defectToCancelCodes": [
    ],
  • "lastModifiedDate": "2025-07-10T14:30:00Z",
  • "lastModifiedBy": "user1",
  • "driverCode": 100176,
  • "defectToFixCodes": [
    ],
  • "extension": {
    }
}

Create dryrun

This endpoint make a dryrun of a job update and return the list of defects resolved and cancelled.

Authorizations:
(OAuth2ApiKeyAuth)
Request Body schema: application/json
contractorCode
required
integer <int32> (PartyCode)

Unique identifier of the party

customerCode
required
integer <int32> (PartyCode)

Unique identifier of the party

customerSiteCode
integer <int32> (SiteCode)

Unique identifier of the site

subscriptionCode
integer <int32> (SubscriptionCode)

Unique identifier of the subscription

serviceProviderSiteCode
integer <int32> (SiteCode)

Unique identifier of the site

customerPurchaseOrderNumber
string (CustomerPurchaseOrderNumber) <= 255 characters

Customer purchase order number

contractorPurchaseOrderNumber
string (ContractorPurchaseOrderNumber) <= 255 characters

Purchase order Number when the contractor purchase the job execution to a service provider

vehicleCode
integer <int32> (VehicleCode)

Unique identifier of the vehicle

initialStateCode
integer <int32> (InspectionCode)

Unique identifier of the inspection

finalStateCode
integer <int32> (InspectionCode)

Unique identifier of the inspection

scheduledDate
string <date> (ScheduledDate)

Scheduled date of the job execution

executionDate
string <date> (ExecutionDate)

Execution date of the job

dueDateCode
integer <int32> (DueDateCode)

Due date code

executionSiteCode
integer <int32> (ExecutionSiteCode)

Execution site code

executionLocation
string (ExecutionLocation) <= 255 characters

The location of the execution

mileage
integer <int32> (Mileage)

Mileage of the vehicle

mileageUOM
string (MileageUOM)
Enum: "km" "mi"

Unit of measurement of the mileage

workingHours
integer <int32> (WorkingHours)

Working hours of the vehicle while inspecting

status
required
string (JobStatus)
Enum: "INITIALIZED" "DRAFTED" "TO_BE_EXECUTED" "EXECUTED" "CLOSED" "CANCELLED"

Status of the job

Array of objects (JobItemQueryDTO)
defectToCancelCodes
Array of integers <int64> [ items <int64 > ]

List of codes referencing to cancelled defects

voucherCode
string (VoucherCode) <= 255 characters

Voucher code for the job execution

driverCode
integer <int64> (ContactCode)

Unique identifier of the contact

object (JobSellingPrices)
currency
string (CurrencyEnum)
Enum: "EUR" "GBP" "CHF" "SEK" "DKK" "CZK" "HUF" "PLN" "RON" "BGN"

Responses

Request samples

Content type
application/json

Create a dryrun

{
  • "contractorCode": "100176",
  • "customerCode": "100176",
  • "customerSiteCode": "100001",
  • "subscriptionCode": "100178",
  • "serviceProviderSiteCode": "100176",
  • "customerPurchaseOrderNumber": "BA123889",
  • "contractorPurchaseOrderNumber": "BA123889",
  • "vehicleCode": "100176",
  • "initialStateCode": "100878",
  • "finalStateCode": "100345",
  • "scheduledDate": "2024-03-01",
  • "executionDate": "2024-03-03",
  • "dueDateCode": "100178",
  • "executionSiteCode": "100179",
  • "executionLocation": "45.759971, 3.128251",
  • "mileage": 120000,
  • "mileageUOM": "km",
  • "workingHours": 300,
  • "status": "INITIALIZED",
  • "items": [
    ],
  • "defectToCancelCodes": [
    ],
  • "driverCode": 100176,
  • "extension": {
    }
}

Response samples

Content type
application/json
{
  • "code": "1000001",
  • "contractorCode": "100176",
  • "customerCode": "100176",
  • "driverCode": "100176",
  • "customerSiteCode": "100001",
  • "subscriptionCode": "100178",
  • "serviceProviderSiteCode": "100176",
  • "customerPurchaseOrderNumber": "BA123889",
  • "contractorPurchaseOrderNumber": "BA123889",
  • "vehicleCode": "100176",
  • "initialStateCode": "100878",
  • "finalStateCode": "100345",
  • "scheduledDate": "2024-11-15T10:00:00",
  • "executionDate": "2024-11-20T15:30:00",
  • "dueDateCode": "100178",
  • "executionSiteCode": "100179",
  • "executionLocation": "123 Main St, Cityville",
  • "mileage": 15000,
  • "mileageUOM": "KM",
  • "workingHours": 300,
  • "status": "COMPLETED",
  • "items": [
    ],
  • "defectToFixCodes": [
    ],
  • "defectToCancelCodes": [
    ],
  • "lastModifiedDate": "2024-12-27T12:23:23",
  • "lastModifiedBy": "api_user",
  • "extensions": {
    }
}