Overview
HTTP verbs
B2BRead tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
| Verb | Usage |
|---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to delete an existing resource |
HTTP status codes
B2BRead tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
| Status code | Usage |
|---|---|
|
The request completed successfully |
|
A new resource has been created successfully. The resource’s URI is available from the response’s
|
|
An update to an existing resource has been applied successfully |
|
The request was malformed. The response body will include an error providing further information |
|
The requested resource requires authentication |
|
You have no permission on requested resource |
|
The requested resource did not exist |
|
The server encountered an unexpected condition that prevented it from fulfilling the request |
|
The server, while acting as a gateway or proxy, received an invalid response from the upstream server |
Headers
Every request should have the following headers:
| Name | Description |
|---|---|
|
Advertises which languages the client is able to understand, and which locale variant is preferred |
|
TS Digital access token (e.g. Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.Et9HFtf9R3GEMA0IICOfFMVXY7kkTX1wr4qCyhIf58U) |
|
User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0) |
|
Caller application name (e.g. TS000) |
|
Caller application version (e.g. 1.0.2) |
Optional headers:
| Name | Description |
|---|---|
|
Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6) |
|
TS Digital item identifier that made the request |
|
TS Digital item identifier that manages the one provided in x-item-id |
|
Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0) |
|
Identifier of local TS Digital user making the request |
Errors
Whenever an error response (status code >= 400) is returned, the body will contain a JSON object that describes the problem. The error object has the following structure:
| Path | Type | Description |
|---|---|---|
|
|
Http Status description |
|
|
Http Status code |
|
|
Response time as ISO date string |
|
|
Error description |
For example, a request that attempts to apply a non-existent tag to a note will produce a
400 Bad Request response:
{
"status": "BAD_REQUEST",
"code": "400",
"timestamp": "02-12-2019 21:00:25",
"message": "E' necessario filtrare per ownerId",
"subErrors": null
}
Hypermedia
RESTful Notes uses hypermedia and resources include links to other resources in their responses.
Responses are in Hypertext
Application Language (HAL) format.
Links can be found beneath the _links key.
Users of the API should not create URIs themselves, instead they should use the above-described links to navigate from resource to resource.
Resources
ItemOverview
Collection of Read Api endpoints used to get items overview.
Post
Obtains overview for requested items.
Request Parameters
Unresolved directive in itemoverview.adoc - include::/app/target/generated-snippets/itemOverview/post/request-parameters.adoc[]
Request Fields
Unresolved directive in itemoverview.adoc - include::/app/target/generated-snippets/itemOverview/post/request-fields.adoc[]
Response Fields
Unresolved directive in itemoverview.adoc - include::/app/target/generated-snippets/itemOverview/post/response-fields.adoc[]
Sample Request
Unresolved directive in itemoverview.adoc - include::/app/target/generated-snippets/itemOverview/post/http-request.adoc[]
Sample Response
Unresolved directive in itemoverview.adoc - include::/app/target/generated-snippets/itemOverview/post/http-response.adoc[]
CURL sample
Unresolved directive in itemoverview.adoc - include::/app/target/generated-snippets/itemOverview/post/curl-request.adoc[]
CompanyConfig
Collection of Read Api endpoints used to get company configuration.
Get CCT config
Obtains CCT config for requested company.
Path Parameters
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/cct/path-parameters.adoc[]
Response Fields
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/cct/response-fields.adoc[]
Sample Request
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/cct/http-request.adoc[]
Sample Response
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/cct/http-response.adoc[]
CURL sample
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/cct/curl-request.adoc[]
Get F@W config
Obtains F@W config for requested company.
Path Parameters
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/faw/path-parameters.adoc[]
Response Fields
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/faw/response-fields.adoc[]
Sample Request
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/faw/http-request.adoc[]
Sample Response
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/faw/http-response.adoc[]
CURL sample
Unresolved directive in companyconfig.adoc - include::/app/target/generated-snippets/companyConfig/faw/curl-request.adoc[]
CSV
TBD
E-Receipts
Collection of Read Api endpoints used to get e-receipts.
Get all/search
Search E-Receipts.
Request Parameters
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getAll/request-parameters.adoc[]
Response Fields
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getAll/response-fields.adoc[]
Sample Request
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getAll/http-request.adoc[]
Sample Response
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getAll/http-response.adoc[]
CURL sample
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getAll/curl-request.adoc[]
Get E-Receipt detail
Get E-Receipt detail by hubId.
Path Parameters
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getOne/path-parameters.adoc[]
Sample Request
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getOne/http-request.adoc[]
Sample Response
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getOne/http-response.adoc[]
CURL sample
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/getOne/curl-request.adoc[]
Download E-Receipt
Download E-Receipt by hubId.
Path Parameters
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/download/path-parameters.adoc[]
Sample Request
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/download/http-request.adoc[]
Sample Response
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/download/http-response.adoc[]
CURL sample
Unresolved directive in ereceipts.adoc - include::/app/target/generated-snippets/eReceipts/download/curl-request.adoc[]
Invoices V2
Collection of Read API endpoints used to list, search and download invoices. Invoices API V1 are deprecated and will be dismissed.
Get all/search
Search Invoices.
Request Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getAll/request-parameters.adoc[]
Response Fields
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getAll/response-fields.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getAll/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getAll/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getAll/curl-request.adoc[]
Get Invoice By HubId
Get invoice detail by hubId.
Path Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getOne/path-parameters.adoc[]
Response Fields
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getOne/response-fields.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getOne/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getOne/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/getOne/curl-request.adoc[]
Download invoice
Download invoice by hubId.
Path Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadInvoice/path-parameters.adoc[]
Request Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadInvoice/request-parameters.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadInvoice/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadInvoice/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadInvoice/curl-request.adoc[]
Preview invoice
Preview invoice by hubId.
Path Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/previewInvoice/path-parameters.adoc[]
Request Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/previewInvoice/request-parameters.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/previewInvoice/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/previewInvoice/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/previewInvoice/curl-request.adoc[]
Download notification
Download invoice notification by hubId and messageId.
Path Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadNotification/path-parameters.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadNotification/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadNotification/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadNotification/curl-request.adoc[]
Download all notification
Download invoice all notifications by hubId.
Path Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadAllMessages/path-parameters.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadAllMessages/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadAllMessages/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadAllMessages/curl-request.adoc[]
Download metadata
Download invoice metadata (only for SDIPA/SDIPR passive invoice) by hubId.
Path Parameters
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadMetadata/path-parameters.adoc[]
Sample Request
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadMetadata/http-request.adoc[]
Sample Response
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadMetadata/http-response.adoc[]
CURL sample
Unresolved directive in invoices.adoc - include::/app/target/generated-snippets/invoices/downloadMetadata/curl-request.adoc[]
Orders
Collection of Read Api endpoints used to get orders.
Get all/search
Search Order.
Request Parameters
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getAll/request-parameters.adoc[]
Response Fields
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getAll/response-fields.adoc[]
Sample Request
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getAll/http-request.adoc[]
Sample Response
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getAll/http-response.adoc[]
CURL sample
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getAll/curl-request.adoc[]
Get Order detail
Get Order detail by hubId.
Path Parameters
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getOne/path-parameters.adoc[]
Sample Request
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getOne/http-request.adoc[]
Sample Response
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getOne/http-response.adoc[]
CURL sample
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/getOne/curl-request.adoc[]
Download Order
Download Order by hubId.
Path Parameters
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/download/path-parameters.adoc[]
Sample Request
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/download/http-request.adoc[]
Sample Response
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/download/http-response.adoc[]
CURL sample
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/download/curl-request.adoc[]
Download Order Notification
Download Order Notification by hubId and messageId.
Path Parameters
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/downloadNotification/path-parameters.adoc[]
Sample Request
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/downloadNotification/http-request.adoc[]
Sample Response
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/downloadNotification/http-response.adoc[]
CURL sample
Unresolved directive in orders.adoc - include::/app/target/generated-snippets/orders/downloadNotification/curl-request.adoc[]