Goods Issue Note Correction

Goods received note are corrections of goods issued note. It is possible to change the quantity of products
⚠️
The creation of good Issued Notes is also possible via the ONe platform in the backoffice. Here's how to do it

Table of contents

Glossary

Name
Explanation
number
Number of goods received note
clientId
Identifier of client to whom goods received note relates
notes
Field for entering a note regarding goods received note
purchaseOrderNumber
Order number for which the document is created goods received note
documentDate
Date of issue of the document
saleDate
date of sale of products for which the document is created goods received note
deliveryDate
date of delivery of products from the created document
productLines: lineNumber salesOrderLineNumber salesOrderReferenceNumber notes quantity
Information about specific product
productLinesproduct: gtin sku manufacturerIndex name pkwiu unit manufacturer productmanufacturer name
Information about specific product
productLinesprices: taxRate discount pricesadditionalCosts: type additionalCostsitem net gross tax additionalCostsline net gross tax
Information about prices for specific product
productLinesbase: net gross tax
Information about base for specific product
deliveryAddress: name street city postCode country
Information about delivery address
paymentMethod: id name
Information about payment method
deliveryMethod id name
Information about delivery method
warehouse: id name
Information about warehouse
operator: id name
Information about operator
pricestotal: net gross tax
Information about total price
uploadId
Identifier numer of upload. Is generated at this endpoint (POST - Initialise file uploading for goods received note)
fileExtension
The extension for the file. In most cases, it will be a PDF.

GET goods received note

There is possible to get specific good received note. Use GET/api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes using specific ID. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter below to find the blockade for a specific client:
  • goodsReceivedNoteNumber
Example request:
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes?goodsReceivedNoteNumber=18%2F06%2F2022" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about client blockade with the following data:
Example response:
json
{ "number": "18/06/2022", "clientId": "org:7cded9b1-a56b-4e73-b20a-41bbe0709ed2", "clientType": "ORGANIZATION", "fileUrl": "https://{link}", "purchaseOrderNumber": "ON/0/14/2022/01", "notes": "notatka", "goodsIssuedNoteReferenceNumber": "255/06/2022", "invoiceReferenceNumbers": [], "invoiceCorrectionReferenceNumber": null, "deliveryAddress": { "name": "One Company", "street": "tatrzanska 29a", "city": "wrocław", "postCode": "111-31", "country": "PL" }, "clientData": { "name": "Technoland - hurtownia komputerowa", "street": "Powstańców Śląskich", "city": "Poznań", "postCode": "22-013", "country": "PL", "tin": "5335345623" }, "tenantData": { "name": "", "street": "", "city": "", "postCode": "", "country": "", "tin": "" }, "documentDate": "2022-06-10", "saleDate": "2022-06-09", "deliveryDate": "2022-06-11", "paymentMethod": { "id": "44444444-4444-4444-4444-444444444444", "name": "Strip" }, "deliveryMethod": { "id": "00000000-0000-4a29-891a-000000000000", "name": "Courier" }, "warehouse": { "id": "WRO", "name": "Warehouse Wrocław" }, "operator": { "id": "00000000-0000-4a29-891a-000000000000", "name": "Operator 1" }, "prices": { "total": { "net": 9990, "gross": 23110, "tax": 233 } }, "productLines": [ { "lineNumber": 1, "salesOrderLineNumber": 1, "goodsIssuedNoteLineNumber": 1, "invoiceLineNumber": null, "salesOrderReferenceNumber": "ON/0/14/2022/01", "notes": "GIN only for first position", "product": { "sku": "AVAC_30202_40", "gtin": null, "manufacturerIndex": null, "name": "Półbuty robocze S1 EN20345 LUMO GRANATOWO NIEB._40", "pkwiu": null, "manufacturer": { "name": "AVAC" }, "unit": "szt." }, "quantity": 1, "prices": { "item": { "net": 41, "gross": 321, "tax": 135 }, "line": { "net": 321, "gross": 23, "tax": 123 }, "base": { "net": 555, "gross": 777, "tax": 1231 }, "taxRate": 10, "discount": 19, "additionalCosts": [ { "type": "dodatkowykoszt", "item": { "net": 5, "gross": 10, "tax": 4 }, "line": { "net": 100, "gross": 320, "tax": 110 } } ] } } ] }

PUT - add goods received note

In order to add goods received note to ONe platform use PUT /api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes. The diagram below shows the dependency of communicating with the API:
Image without caption
Example response:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -H "Content-Type: application/json" -d "{ "number": "18/06/2022", -- required "productLines": [ -- required { "lineNumber": 1, -- required "goodsIssuedNoteLineNumber": 1, -- required "product": { -- required "sku": "AVAC_30202_40", -- required "name": "Półbuty robocze S1 EN20345 LUMO GRANATOWO NIEB._40", -- required "manufacturer": { "name": "AVAC" -- required if manufacturer is used }, "unit": "szt." -- required }, "quantity": 1, -- required "prices": { -- required "additionalCosts": [ -- required { "type": "dodatkowykoszt", -- required "item": { -- required "net": 5, -- required "gross": 10, -- required "tax": 4 -- required }, "line": { -- required "net": 100, -- required "gross": 320, -- required "tax": 110 -- required } } ], "item": { -- required "net": 41, -- required "gross": 321, -- required "tax": 135 -- required }, "line": { -- required "net": 321, -- required "gross": 23, -- required "tax": 123 -- required }, "base": { -- required "net": 555, -- required "gross": 777, -- required "tax": 1231 -- required }, "taxRate": 10, -- required "discount": 19 } } ], "clientId": "org:7cded9b1-a56b-4e73-b20a-41bbe0709ed2", -- required "purchaseOrderNumber": "ON/0/14/2022/01", "notes": "notatka", "goodsIssuedNoteReferenceNumber": "255/06/2022", "deliveryAddress": { -- required "name": "One Company", -- required "street": "tatrzanska 29a", -- required "city": "wrocław", -- required "postCode": "111-31", -- required "country": "PL" -- required }, "documentDate": "2022-06-10", -- required "saleDate": "2022-06-09", -- required "deliveryDate": "2022-06-11", "paymentMethod": { -- required "id": "44444444-4444-4444-4444-444444444444", -- required "name": "Strip" -- required }, "deliveryMethod": { -- required "id": "00000000-0000-4a29-891a-000000000000", -- required "name": "Courier" -- required }, "warehouse": { -- required "id": "WRO", -- required "name": "Warehouse Wrocław" -- required }, "operator": { "id": "00000000-0000-4a29-891a-000000000000", "name": "Operator 1" }, "prices": { -- required "total": { -- required "net": 9990, -- required "gross": 23110, -- required "tax": 233 -- required } } }"

POST - finalize file uploading for goods received note

This endpoint is used to complete the process of adding a document to our server. Use this endpoint after physically adding documents to the server - POST /api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes/file-upload-finalize.
The diagram below shows the dependency of communicating with the API:
Image without caption
Use the parameter below in query to find a specific goods received note:
  • uploadId
⚠️
uploadId it is possible to get from this endpoint (POST - Initialise file uploading for goods received note)
Example request:
json
curl -X POST "https://api-preprod.one.unity.pl/api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes/file-upload-finalize?uploadId=a36b3639-4ec6-438b-a377-7b718e733105" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"

POST - Initialise file uploading for goods received note

On the ONe platform, it is possible to send a document in the form of a PDF file to a specific goods issued notes. Use POST /api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes/file-upload-initialize to receive parameters on the basis of which it will be possible to add a document to our server.
⚠️
To add the document to our server, use an external tool. For example Talend Api Tester. At the end of the description, we will show an example of this tool how to add a file to our server.
The sequence diagram below shows the dependency of communicating with the API:
Image without caption
Use the parameter to initialise file uploading for a specific document:
  • fileExtension
  • goodsReceivedNoteNumber
Example request:
json
curl -X POST "https://api-preprod.one.unity.pl/api/v1/account/integrations/auth-required/client-blockades/org%3Ab4c8ce61-d434-4645-b338-f0e2d27e78a8" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information needed to add documents to our server
  • uploadUrl
  • uploadId
Example response:
json
{ "uploadUrl": "https://{link}", "uploadId": "a36b3639-4ec6-438b-a377-7b718e733105" }
When we get uploadUrland uploadId we can use tool to add documents to our server. Below we present how to do it using an Talend API Tester. 1 - method - PUT 2 - in headers - content-Type and choose application/pdf 3 - paste the link received in resonse to the request 4 - add file 5- press send
Image without caption
The document has been added to the server.

GET goods received note events

The ONe platform allows you to create goods received note documents directly in the platform, which is why using this enpoint it is possible to synchronize data between the ONe platform and ERP.
To do this, use GET/api/v1/account/integrations/auth-required/goods-received-notes/synchronization. The sequence diagram below shows the process:
Image without caption
Use the parameter in query below to get goods received note events:
  • startId
Example request:
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/goods-issued-notes/integrations/auth-required/goods-received-notes/synchronization?startId=1" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about events and next ID:
Example response:
json
{ "nextId": 2, "events": [ { "goodsReceivedNoteNumber": "GRN/2/2022", "type": "GoodsReceivedNoteCreated" } ] }