Fusion Operations API
Welcome to the Fusion Operations API. We aim to provide easy access to our platform.
API Base URI Endpoint
The endpoint for all our API calls is: https://fusionoperations.autodesk.com/
Authentication
Fusion Operations API uses a simple token authorization. First you create a new token (or acquire an existing one). After you have acquired your token you can use it to access other resources within the token’s scope.
Your authentication token lasts for 2 hours and then you have to request a new one with your API credentials. Additional information on how to create, retrieve and delete the access token can be consulted in this section.
Media Types
Requests with a message-body are using plain JSON to set or update resource states.
Error States
The common HTTP Response Status Codes are used.
Invalid Json
If you get a response stating “Invalid JSON” please validate the json payload you’re using on JSONLint.
Rate Limit
API requests are limited to 120 requests per minute per company.
After the limit is exceeded, subsequent requests will obtain a response with HTTP Status Code 429 Too Many Requests
.
Additionally, a header will show how many seconds you must wait before retrying the request:
Retry-After: <delay-seconds>
Best practices to deal with the rate limit:
-
Spread requests evenly over time to avoid usage spikes that may result in throttled responses
-
Develop logic that uses the
Retry-After
info to know when the request may be retried -
Make sure you don’t have unnecessary integrations running in parallel, because all the integrations will count towards the limit
Date Format
The API date fields format follows the representation of ISO 8601:
- YYYY-MM-DDThh:mm:ssZ
In this format the letter T works as a required delimiter, whereas Z is a timezone designator if required. When Z is not used then the timezone applied to the date is the same as the one set in your Fusion Operations company. The Z stands for the Zero timezone, as it is offset by 0.
Usage example:
-
If the time being used is one hour ahead of UTC then the zone designator should be “+01:00”, “+0100”, or simply “+01”.
-
If a company time zone is set to -05:00 and the date sent has the following format: 2020-07-20T09:15:15Z, then the date will be displayed in Fusion Operations as: 07/20/2020 - 04:15:15
-
If the format sent is: 2020-07-20T09:15:15, then the date will be displayed in Fusion Operations as: 07/20/2020 - 09:15:15 (with -05:00 timezone), which means if a user has a timezone set to -04:00 will see it as: 07/20/2020 - 10:15:15
Sample integrations workflows ¶
With Fusion Operations API, it’s possible to integrate with other systems, such as Enterprise Resource Planning (ERP), Product Lifecycle Management (PLM), Accounting, Marketplaces, Machines, and Business Intelligence. In this section you can find some examples of possible integrations to have different entities synchronized between systems.
Disclaimer: Note that the integrations and recommendations provided herein are suggestions based on common API use cases. Users are encouraged to validate their specific integration requirements and ensure compatibility with their systems. Thoroughly verify your integration to meet your needs and comply with all relevant standards and regulations. It is also recommended to approach the integration with a phased strategy, incorporating additional entities gradually over time to ensure a smooth integration, minimizing disruptions and optimizing functionality. Autodesk does not guarantee the suitability of the API for all possible integrations and use cases.
ERP Integrations
These integrations usually connect Production Orders, Production Records, Inventory and Products. They may also synchronize Sales and Purchase Orders.
- Production Orders
When a Production Order is created on the ERP side, the Production Order data should be sent to Fusion Operations API using the Production Order creation endpoint. If the Production Order needs to be updated in Fusion Operations, the Production Order Edition endpoint must be used. When completing the Production Order in Fusion Operations that information can be sent back to the ERP by using the production_order_completed webhook.
- Production Records
When a Production Record is created in Fusion Operations, that information can be sent back to the ERP by using the production_ created webhook. It’s also possible to define webhooks that are triggered when a Production Record is updated or deleted. It is recommended to use the production_updated webhook – that is triggered when a production record is finished – to update the Production Record information in the ERP with the information submitted by the worker when checking out production. Alternatively, the Production Records data may also be synchronized when a Production Order is completed (via its corresponding production_order_completed webhook). For that, after receiving the webhook, the Productions Records List endpoint (filtered by the Production Order) should be used to retrieve the corresponding production data. Using the production_created and production_updated webhook should be used in case there’s a need to have the production data in real time in the ERP. If production data is required to be in the ERP only after the order has been completed, the production_order_completed and the Production Records List endpoint should be used.
- Inventory
When a product is received, shipped, consumed or produced in Fusion Operations, the new inventory quantity can be sent back to the ERP by using the stock_updated webhook.
- Products
When a new product or product version is created in the ERP, the Product data should be sent to Fusion Operations API using the Product creation endpoint. If the Product needs to be updated, the Product edition endpoint must be used. If only the Bill of Materials needs to be updated, the Update Product BoM endpoint must be used.
- Sales & Purchase Orders
When a new Sales Order or Purchase Order is created in the ERP, the Sales Order or Purchase Order data should be sent to Fusion Operations API using the Sales Order creation endpoint or Purchase Order creation endpoint. If these need to be updated, the Sales Order edition endpoint or Purchase Order edition endpoint must be used. When closing the Sales Order or Purchase Order in Fusion Operations that information can be sent back to the ERP by using the sales_order_closed or purchase_order_closed webhooks.
PLM Integrations
These integrations usually synchronize Products, their Bill of Materials, and use Production Records data to trigger actions in the PLM.
- Products
When a new product or product version is created in the PLM, the Product data should be sent to Fusion Operations API using the Product creation endpoint. If the Product is updated in the PLM, the Product edition endpoint may be used to update the data in Fusion Operations.
- Production Records creating Non-Conformities / Problem Reports
When a production record containing waste is created in Fusion Operations, the production_created and production_updated webhook may be used to trigger the non-conformity record in the PLM. The webhook content for production records containing waste will have the attribute “produced-waste” not empty. The waste code or its quantity may be used to decide what is triggered in the PLM (non-conformity or a problem report).
- Production Records creating Problem Reports
When a production record containing a parameter outside of the limit is created in Fusion Operations, a problem report may be triggered in the PLM. The production_created or production_updated webhook will contain the production record data (such as product and operation code) along with the parameters and corresponding values that must be afterwards compared against their normal range.
Accounting Integrations
These integrations usually connect Sales Orders, Shipping Inventory Movements, Purchase Orders, Receiving Inventory Movements, Inventory and Products.
- Sales Orders
When a new Sales Order is created in the accounting system, the Sales Order data should be sent to Fusion Operations API using the Sales Order creation endpoint. If these need to be updated, the Sales Order edition endpoint must be used. When closing the Sales Order in Fusion Operations that information can be sent back to the accounting system by using the sales_order_closed webhook. This trigger may be used to create an invoice on the accounting system.
- Shipping Inventory Movements
Every time a product on a Sales Order is shipped, that information can be sent back to the accounting system to update the shipping status and create an Invoice by using the shipping_inventory_movement_created webhook.
- Purchase Orders
When a new Purchase Order is created in the ERP, the Purchase Order data should be sent to Fusion Operations API using the Purchase Order creation endpoint. If these need to be updated, the Purchase Order edition endpoint must be used. When closing the Purchase Order in Fusion Operations that information can be sent back to the accounting system by using the purchase_order_closed webhook. This trigger may be used to create a bill on the accounting system.
- Receiving Inventory Movements
Every time a product on a Purchase Order is received, that information can be sent back to the accounting system to update the receiving status and create a bill by using the receiving_inventory_movement_created.
- Inventory
When a product is received, shipped, consumed or produced in Fusion Operations, the new inventory quantity can be sent back to the ERP by using the stock_updated webhook.
- Products
When a new Product is created in the accounting system, the Product data should be sent to Fusion Operations API using the Product creation endpoint. If the Product needs to be updated, the Product edition endpoint must be used.
Marketplaces/E-commerce Integrations
These integrations usually connect Sales Orders, Shipping Movements, Inventory and Products.
- Sales Orders
When a new Sales Order is created in the marketplace, the Sales Order data should be sent to Fusion Operations API using the Sales Order creation endpoint. If these need to be updated, the Sales Order edition endpoint must be used. When closing the Sales Order in Fusion Operations that information can be sent back to the marketplace by using the sales_order_closed webhook.
- Shipping Inventory Movements
When one of the products of a Sales Order is shipped, that information can be sent back to the marketplace to update the shipping status by using the shipping_inventory_movement_created. This trigger can also be used to create shipping labels in external systems.
- Inventory
When a product is received, shipped, consumed or produced in Fusion Operations, the new inventory quantity can be sent back to the ERP by using the stock_updated webhook.
- Products
When a new Product is created in the accounting system, the Product data should be sent to Fusion Operations API using the Product creation endpoint. If the Product needs to be updated, the Product edition endpoint must be used.
Machine Connectivity Integrations
These integrations usually synchronize Machines and their status over time (stopped, producing, or available)
- Machine stopped/available
When a machine is stopped, that information can be sent to Fusion Operations by using the Machines Update Downtime endpoint. This endpoint will create a downtime record associated to the machine. The same endpoint can be used to indicate the machine is available again (meaning that the downtime has ended), ending the downtime record associated to the machine.
- Machine producing/available
When a machine starts production, that information can be sent to Fusion Operations by using the Production Records Creation endpoint. When the machine ends production, that information can be sent to Fusion Operations by using the Production Records Edition endpoint (the Production Record attribute “finished” must be set to “true”).
- Machine producing/stopped
A machine can have both an open Production Record and Downtime Record at the same time. In that case the machine will be marked as stopped, since the machine stopped status overrides the machine producing status.
Business Intelligence (BI)
These integrations usually pull production records and production orders data from Fusion Operations. It’s possible to see a more detailed analysis on how to build an integration with Power BI Desktop in this article.
- Production Records
Production Records data can be pulled from Fusion Operations using the Production Records List endpoint.
- Production Orders
Production Orders data can be pulled from Fusion Operations using the Production Orders List endpoint.
Access Authorization and Control ¶
Access and Control of Fusion Operations Authentication token.
Authorization ¶
Authorization Resource represents an authorization granted to the company. You can only access your own authorization. The authentication used is Basic authentication, where the Authentication header is on the form <base64 encoded value of API_KEY:API_SECRET>. To get the API Key and Secret, login to Fusion Operations and edit your user. (Note: you have to have admin role to get it). The Authorization Resource has the following attribute:
-
token
-
scopes
Where token represents a token and scopes is an array of scopes granted for the given authorization. At this moment the only available scope is productions_write
.
Retrieve AuthorizationGET/api/v1/authorization
Status: available Use GET to retrieve an existing access token. If a token doesn’t exist yet, one can be generated using the POST method.
Example URI
Headers
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
200
Headers
Content-Type: application/hal+json
Link: <https://fusionoperations.autodesk.com/api/v1/authorization>;rel="self"
Body
{
"_links": {
"self": { "href": "/api/v1/authorization" },
},
"scopes": [
"productions_write"
],
"token": "abc123"
}
Create AuthorizationPOST/api/v1/authorization
Status: available Use POST to generate a new access token.
Example URI
Headers
Content-Type: application/json
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Body
{
"scopes": [
"productions_write"
]
}
201
Headers
Content-Type: application/hal+json
Link: <https://fusionoperations.autodesk.com/api/v1/authorization>;rel="self"
Body
{
"_links": {
"self": { "href": "/api/v1/authorization" },
},
"scopes": [
"productions_write"
],
"token": "abc123"
}
Remove an AuthorizationDELETE/api/v1/authorization
Status: available
Example URI
Headers
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
200
Sales Order ¶
Sales Order resources of the Fusion Operations API.
Sales Order ¶
A single Sales Order object. The Sales Order resource is one of the most important resources of the Fusion Operations API.
The Sales Order resource has the following attributes:
-
id (number) - Sales Order ID
-
code (string) - Sales Order code
-
creation-date (string, format YYYY-MM-DDTHH:MM:SSZ) - Sales Order creation date
-
ended (boolean) - Sales order is ended
-
archived (boolean) - Sales Order is archived
-
client (object)
- id (number) - Client ID
- code (string) - Client Code
-
billing-address (object)
- id (number) - Address ID
- code (string) - Address code
- name (string) - Address name
- address (string) - Address street and house number
- city (string) - Address city
- post-code (string) - Adress postal code
- state - (string) - Address state
- country (string) - Address country
- default (boolean) - It is the default address of the client
-
observations (string, max length 5000) - Sales Order observations
-
notes (string, max length 10000) - Sales Order notes
-
external-notes (string, max length 10000) - Sales Order external notes
-
shippings (array)
- id (number) - Shiping ID
- code (string) - Shipping Code
- requested-date (date, format YYYY-MM-DDTHH:MM:SSZ) - Date when the shipping is requested
- due-date (date, format YYYY-MM-DDTHH:MM:SSZ) - Date when the shipping is due
- location (string) - Location from when it will be shipped, if multisite
- delivery-address (object)
- id (number) - Address ID
- code (string) - Address code
- name (string) - Address name
- address (string) - Address street and house number
- city (string) - Address city
- post-code (string) - Adress postal code
- state - (string) - Address state
- country (string) - Address country
- default (boolean) - It is the default address of the client
- price (number) - Shipping price
- shipping-price (number) - Shipping shipment price
- products (array)
- id (number) - Shipping Product ID
- product (object)
- id (number) - Product ID
- code (string) - Product Code
- name (string) - Product Name
- quantity (double, >0) - Shipping Product quantity ordered
- price (double) - Product price
- observations (string, max length 5000)
- parameters (array)
- name (string) - Parameter name
- value (string/number) - Parameter value
-
parameters (array)
- name (string) - Parameter name
- value (string/number) - Parameter value
Create a Sales OrderPOST/api/v1/sales-orders/{?access_token}
Status: available
This action requires an access_token with productions_write scope. To create a Sales Order provide a JSON hash of the attributes for the new Sales Order.
It’s only possible to create one Sales Order per request.
Nested attributes such as ‘client’ and ‘billing-address’ require either the ID or the code of an already created entity to be provided.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"code": "Sales Order code",
"creation-date": "2025-01-25T08:30:01Z",
"ended": false,
"archived": false,
"client": {
"id": 1,
"code": "client code"
},
"billing-address": {
"id": 1,
"code": "Billing address code"
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"shippings": [
{
"code": "Shipping code",
"requested-date": "",
"due-date": "",
"location": {
"id": 1,
"code": "Location code"
},
"delivery-address": {
"id": 1,
"code": "Delivery address code"
},
"shipping-price": 1.5,
"products": [
{
"product": {
"id": 1,
"code": "Product code"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
201
Body
{
"id": 1,
"code": "Sales Order code",
"creation-date": "2025-01-25T08:30:01Z",
"ended": false,
"archived": false,
"client": {
"id": 1,
"code": "client code",
"name": "client name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"shippings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "",
"due-date": "",
"location": {
"id": 1,
"code": "Location code",
"name": "Location name"
},
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"price": 2,
"shipping-price": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List Sales OrdersGET/api/v1/sales-orders/{?access_token}
Status: available
This action requires an access_token with productions_write scope.
This service is paginated. Multiple parameters will be treated as an AND condition.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- page-size
numeric
(optional)number of results per page, default 25
- sort
string
(optional)Sort results by one of the following attributes “id”, “code”, “creation-date”, default sort is by “id”
- order
string
(optional)Order results by “asc” or “desc”, default order is by “asc”
- due-date-before
string
(optional)List Sales Orders with due date before this, format YYYY-MM-DDTHH:MM:SSZ
- due-date-after
string
(optional)List Sales Orders with due date after this, format YYYY-MM-DDTHH:MM:SSZ
- client-code
string
(optional)List Sales Orders that belong to the client code
- client-id
string
(optional)List Sales Orders that belong to the client id
- open
boolean
(optional)List Sales Orders with status open
- closed
boolean
(optional)List Sales Orders with status closed
- archived
boolean
(optional)List Sales Orders with status archived
Headers
Content-Type: application/json
200
Body
[
{
"id": 1,
"code": "Sales Order code",
"creation-date": "2025-01-25T08:30:01Z",
"ended": false,
"archived": false,
"client": {
"id": 1,
"code": "client code",
"name": "client name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"shippings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "",
"due-date": "",
"location": {
"id": 1,
"code": "Location code",
"name": "Location name"
},
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"price": 10,
"shipping-price": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Retrieve a Sales OrderGET/api/v1/sales-orders/{id}{?access_token}
Status: available
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(optional)Sales Order ID.
Headers
Content-Type: application/json
200
Body
{
"id": 1,
"code": "Sales Order code",
"creation-date": "2025-01-25T08:30:01Z",
"ended": false,
"archived": false,
"client": {
"id": 1,
"code": "client code",
"name": "client name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"shippings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "",
"due-date": "",
"location": {
"id": 1,
"code": "Location code",
"name": "Location name"
},
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"price": 10,
"shipping-price": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update a Sales OrderPUT/api/v1/sales-orders/{id}{?access_token}
Status: available
This action requires an access_token with productions_write scope. To create a Sales Order provide a JSON hash of the attributes for the new Sales Order.
It’s only possible to update one Sales Order per request.
Nested attributes such as ‘client’ and ‘billing-address’ require either the ID or the code of an already created entity to be provided.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(optional)Sales Order ID.
Headers
Content-Type: application/json
Body
{
"code": "Sales Order code",
"creation-date": "2025-01-25T08:30:01Z",
"ended": false,
"archived": false,
"client": {
"id": 1,
"code": "client code"
},
"billing-address": {
"id": 1,
"code": "code"
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"shippings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"location": {
"id": 1,
"code": "Location code"
},
"delivery-address": {
"id": 1,
"code": "code"
},
"shipping-price": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
200
Body
{
"id": 1,
"code": "Sales Order code",
"creation-date": "2025-01-25T08:30:01Z",
"ended": false,
"archived": false,
"client": {
"id": 1,
"code": "client code",
"name": "client name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"shippings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"location": {
"id": 1,
"code": "Location code",
"name": "Location name"
},
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"price": 2,
"shipping-price": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Remove a Sales OrderDELETE/api/v1/sales-orders/{id}{?access_token}
Status: available
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(optional)Sales Order ID.
Headers
Content-Type: application/json
204
Body
Sales order was deleted
400
Body
Sales order already has production orders created or other entities associated, cannot be removed.
Client ¶
Client resources of the Fusion Operations API.
Client ¶
A single Client object.
The Client resource has the following attributes:
-
id (number) - Client ID
-
code (string) - Client code
-
name (string) - Client name
-
vat-number (string) - Client number
-
phone-number (string) - Client phone number
-
email (string) - Client email
-
addresses (array)
- code (string) - Address code
- name (string) - Address name
- address (string) - Address line
- city (string) - Address city
- post-code (string) - Address post code
- state (string) - Address state/region
- country (string) - Address country code
- default (boolean) - It is the Client default address
-
contacts (array)
- phone-number (string) - Contact phone number
- email (string) - Contact email
- name (string) - Contact name
- default (boolean) - It is the Client default contact
Default address/contact rules:
-
Both the contacts and addresses can only have one default contact or address, respectively
-
If a client has addresses, one of the addresses needs to be the default one
-
If a client has contacts, one of the contacts needs to be the default one
-
In creation/update of a client, if no default contact/address is given, the first contact/address is going to be the default one
Create a ClientPOST/api/v1/clients/{?access_token}
Status: available
This action requires an access_token with productions_write scope. To update a Client provide a JSON hash of the attributes for the new Client.
It’s only possible to create one Client per request.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"code": "Client",
"name": "Client",
"vat-number": "213456",
"email": "client@client.com",
"contacts": [
{
"phone-number": "12345678",
"email": "client@client.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "client2@client2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"city": "Lisbon",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"city": "San Francisco",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
201
Body
{
"id": 987356123,
"code": "Client",
"name": "Client",
"vat-number": "213456",
"email": "client@client.com",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "client2@client2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"city": "Lisbon",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"city": "San Francisco",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List ClientsGET/api/v1/clients/{?access_token}
Status: available
To list Clients. This action requires an access_token with productions_write scope. This service is paginated, returning 25 Sales Orders per page.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- page-size
numeric
(optional)number of results per page, default 25
- sort
string
(optional)Sort results by one of the following attributes “id”, “code”, default sort is by “id”
- order
string
(optional)Order results by “asc” or “desc”, default order is by “asc”
- code
string
(optional)List Clients filtered by code
Headers
Content-Type: application/json
200
Body
[
{
"id": 987356123,
"code": "Client",
"name": "Client",
"vat-number": "213456",
"phone-number": "12345678",
"email": "client@client.com",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"city": "Lisbon",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
}
]
},
{
"id": 987356124,
"code": "Client2",
"name": "Client2",
"number": "2213457",
"phone-number": "12345678",
"email": "client2@client2.com",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
}
],
"addresses": [
{
"code": "Address2",
"name": "Address2",
"city": "San Francisco",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": true
}
]
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Retrieve a ClientGET/api/v1/clients/{id}{?access_token}
Status: available
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Client ID
Headers
Content-Type: application/json
200
Body
{
"id": 987356123,
"code": "Client",
"name": "Client",
"vat-number": "213456",
"phone-number": "12345678",
"email": "client@client.com",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"city": "Lisbon",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"city": "San Francisco",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update a ClientPUT/api/v1/clients/{id}{?access_token}
Status: available
This action requires an access_token with productions_write scope. To update a Client provide a JSON hash of the attributes for the new Client.
It’s only possible to update one Client per request.
Contacts
-
The given supplier contacts will replace the current contacts.
-
If a contact with the same
name
as an existing contact is given, the contact with thatname
will have its values replaced by the ones given. -
If no contacts are given, the existing contacts will be removed.
Addresses
-
The given addresses will replace the current addresses.
-
If an address with the same
code
as an existing address is given, the address with thatcode
will have its values replaced by the ones given. -
If no addresses are given, the existing addresses wil be removed.
-
If an address has associated entities, the request will fail since the address cannot be removed.
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Client ID
Headers
Content-Type: application/json
Body
{
"code": "Client",
"name": "Client",
"vat-number": "213456",
"phone-number": "12345678",
"email": "client@client.com",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address3",
"name": "Address3",
"city": "Los Angeles",
"address": "Address 3 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": true
}
]
}
200
Body
{
"id": 987356123,
"code": "Client",
"name": "Client",
"vat-number": "213456",
"phone-number": "12345678",
"email": "client@client.com",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address3",
"name": "Address3",
"city": "Los Angeles",
"address": "Address 3 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": true
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Remove a ClientDELETE/api/v1/clients/{id}{?access_token}
Status: available
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Client ID.
Headers
Content-Type: application/json
204
Body
Client was deleted
400
Body
It's not possible to delete this client. It has dependent entities.
Purchase Order ¶
PurchaseOrder resources of the Fusion Operations API.
Purchase Order ¶
A single Purchase Order object. The Purchase Order resource is one of the most important resources of the Fusion Operations API.
The Purchase Order resource has the following attributes:
-
id (supplied)
-
code (string) - purchase order code
-
creation-date (string, format YYYY-MM-DDTHH:MM:SSZ) - Sales Order creation date
-
active (boolean) - Sales order is active
-
ended (boolean) - Sales order is ended
-
archived (boolean) - Sales Order is archived
-
supplier (object)
- id (number) - Supplier ID
- code (string) - Supplier Code
-
billing-address (object)
- id (number) - Address ID
- code (string) - Address code
- name (string) - Address name
- address (string) - Address street and house number
- city (string) - Address city
- post-code (string) - Adress postal code
- state - (string) - Address state
- country (string) - Address country
- default (boolean) - It is the default address of the supplier
-
observations (string, max length 5000) - Sales Order observations
-
notes (string, max length 10000) - Sales Order notes
-
external-notes (string, max length 10000) - Sales Order external notes
-
receivings
- id (number) - Shiping ID
- code (string) - Shipping Code
- requested-date (date, format YYYY-MM-DDTHH:MM:SSZ) - Date when the shipping is requested
- due-date (date, format YYYY-MM-DDTHH:MM:SSZ) - Date when the shipping is due
- delivery-address (object)
- id (number) - Address ID
- code (string) - Address code
- name (string) - Address name
- address (string) - Address street and house number
- city (string) - Address city
- post-code (string) - Adress postal code
- state - (string) - Address state
- country (string) - Address country
- default (boolean) - It is the default address of the client
- cost (number) - Receiving cost
- shipping-cost (number) - Receiving shipment cost
- products (array)
- id (number) - Receiving Product ID
- product (object)
- id (number) - Product ID
- code (string) - Product Code
- name (string) - Product Name
- quantity (double, >0) - Receiving Product quantity ordered
- price (double) - Receiving Product price
- observations (string, max length 5000) - Receiving Product observations
- parameters (array)
- name (string) - Parameter name
- value (string/number) - Parameter value
-
parameters (array)
- name (string) - Parameter name
- value (string/number) - Parameter value
-
approval-status (string) - Approval status (draft|in review|approved| confirmed|rejected)
Create a Purchase OrderPOST/api/v1/purchase-orders/{?access_token}
Status: available
This action requires an access_token with productions_write scope. To create a Purchase Order provide a JSON hash of the attributes for the new Purchase Order.
It’s only possible to create one Purchase Order per request.
Nested attributes such as ‘supplier’ and ‘billing-address’ require either the ID or the code of an already created entity to be provided.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"code": "Purchase Order code",
"creation-date": "2025-01-25T08:30:01Z",
"active": true,
"ended": false,
"archived": false,
"supplier": {
"id": 1,
"code": "Supplier code"
},
"billing-address": {
"id": 1,
"code": "Billing address code"
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"receivings": [
{
"code": "Receiving code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"delivery-address": {
"id": 1,
"code": "Delivery address code"
},
"shipping-cost": 1.5,
"products": [
{
"product": {
"id": 1,
"code": "Product code"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
],
"approval-status": "approved"
}
201
Body
{
"id": 1,
"code": "Purchase Order code",
"creation-date": "2025-01-25T08:30:01Z",
"active": true,
"ended": false,
"archived": false,
"supplier": {
"id": 1,
"code": "supplier code",
"name": "supplier name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"receivings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"cost": 4,
"shipping-cost": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"cost": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
],
"approval-status": "approved"
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List Purchase OrdersGET/api/v1/purchase-orders/{?access_token}
Status: available
This action requires an access_token with productions_write scope.
This service is paginated. Multiple parameters will be treated as an AND condition.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- page-size
numeric
(optional)number of results per page, default 25
- sort
string
(optional)Sort results by one of the following attributes “id”, “code”, “creation-date”, default sort is by “id”
- order
string
(optional)Order results by “asc” or “desc”, default order is by “asc”
- due-date-before
date
(optional)List Purchase Orders with due date before this
- due-date-after
date
(optional)List Purchase Orders with due date after this
- code
string
(optional)List purchase orders filtered by purchase order code
- supplier-id
string
(optional)List Purchase Orders that belong to the client id
- supplier-code
string
(optional)List Purchase Orders that belong to the client code
- open
boolean
(optional)List Purchase Orders with status open
- closed
boolean
(optional)List Purchase Orders with status closed
- archived
boolean
(optional)List Purchase Orders with status archived
Headers
Content-Type: application/json
200
Body
[
{
"id": 1,
"code": "Purchase Order code",
"creation-date": "2025-01-25T08:30:01Z",
"active": true,
"ended": false,
"archived": false,
"supplier": {
"id": 1,
"code": "supplier code",
"name": "supplier name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"receivings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"cost": 4,
"shipping-cost": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"cost": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
],
"approval-status": "approved"
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Retrieve a Purchase OrderGET/api/v1/purchase-orders/{id}{?access_token}
Status: available
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Purchase order id
Headers
Content-Type: application/json
200
Body
{
"id": 1,
"code": "Purchase Order code",
"creation-date": "2025-01-25T08:30:01Z",
"active": true,
"ended": false,
"archived": false,
"supplier": {
"id": 1,
"code": "supplier code",
"name": "supplier name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"receivings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"cost": 4,
"shipping-cost": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"cost": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
],
"approval-status": "approved"
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update a Purchase OrderPUT/api/v1/purchase-orders/{id}{?access_token}
Status: available
This action requires an access_token with productions_write scope. To create a Sales Order provide a JSON hash of the attributes for the new Sales Order.
It’s only possible to update one Purchase Order per request.
Nested attributes such as ‘supplier’ and ‘billing-address’ require either the ID or the code of an already created entity to be provided.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Purchase order id
Headers
Content-Type: application/json
Body
{
"id": 1,
"code": "Purchase Order code",
"creation-date": "2025-01-25T08:30:01Z",
"active": true,
"ended": false,
"archived": false,
"supplier": {
"id": 1,
"code": "Supplier code"
},
"billing-address": {
"id": 1,
"code": "Billing address code"
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"receivings": [
{
"id": 1,
"code": "Receiving code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"delivery-address": {
"id": 1,
"code": "Delivery address code"
},
"shipping-cost": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code"
},
"quantity": 2,
"price": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
],
"approval-status": "approved"
}
200
Body
{
"id": 1,
"code": "Purchase Order code",
"creation-date": "2025-01-25T08:30:01Z",
"active": true,
"ended": false,
"archived": false,
"supplier": {
"id": 1,
"code": "supplier code",
"name": "supplier name",
"vat-number": "number",
"phone-number": "phone number",
"email": "email",
"contacts": [
{
"phone-number": "phone number",
"email": "email",
"name": "name",
"default": true
}
],
"addresses": [
{
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
}
]
},
"billing-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"observations": "Ready next week",
"notes": "notes",
"external-notes": "external-notes",
"receivings": [
{
"id": 1,
"code": "Shipping code",
"requested-date": "2025-01-25T08:30:01Z",
"due-date": "2025-01-25T08:30:01Z",
"delivery-address": {
"id": 1,
"code": "code",
"name": "name",
"address": "address street",
"city": "city",
"post-code": "postal code",
"state": "state",
"country": "country",
"default": true
},
"cost": 4,
"shipping-cost": 1.5,
"products": [
{
"id": 1,
"product": {
"id": 1,
"code": "Product code",
"name": "Product name"
},
"quantity": 2,
"cost": 2,
"observations": "observations",
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
]
}
]
}
],
"parameters": [
{
"name": "Parameter name",
"value": "Parameter value"
}
],
"approval-status": "approved"
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Remove a Purchase OrderDELETE/api/v1/purchase-orders/{id}{?access_token}
Status: available
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Purchase Order ID.
Headers
Content-Type: application/json
204
Body
Purchase order was deleted
400
Body
Purchase order already has other entities associated, cannot be removed.
Supplier ¶
Supplier resources of the Fusion Operations API.
Supplier ¶
A single Supplier object.
The Supplier resource has the following attributes:
-
id (number)
-
code (string) - supplier code
-
name (string) - supplier name
-
vat-number (string) - supplier VAT number
-
expiration-date (date, format YYYY-MM-DDTHH:MM:SSZ) - date when the supplier expires
-
addresses (array, optional)
- code (string, required, unique) - address code
- name (string, optional) - address name
- address (string, required) - address line
- city (string, optional) - address city
- post-code (string, optional) - address post code
- state (string, optional) - address state/region
- country (string, required) - address country code
- default (boolean, optional - defaults to
false
) - iftrue
, it’s the supplier default address
-
contacts (array, optional)
- phone-number (string, required if there is no
email
) - contact phone number - email (string, required if there is no
phone-number
) - contact email - name (string, optional) - contact name
- default (boolean, optional - defaults to
false
) - iftrue
, it’s the supplier default contact
- phone-number (string, required if there is no
Default address/contact rules:
-
Both the contacts and addresses must have only one default contact or address, respectively
-
If a supplier has addresses, one of the addresses needs to be the default one
-
If a supplier has contacts, one of the contacts needs to be the default one
-
In creation/update of a supplier, if no default contact/address is given, the first contact/address is going to be the default one
Create a SupplierPOST/api/v1/suppliers/{?access_token}
Status: available
To create a Supplier provide a JSON hash of the attributes for the new Supplier. This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"code": "Supplier",
"name": "Supplier",
"number": "213456",
"expiration-date": "2020-01-01T00:00:00Z",
"contacts": [
{
"email": "supplier@supplier.com",
"phone-number": "12345678",
"name": "Contact1",
"default": true
},
{
"email": "supplier2@supplier2.com",
"phone-number": "123456789",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"city": "Lisbon",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"city": "San Francisco",
"address": "Address 1 Street",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
201
Body
{
"id": 987356123,
"code": "Supplier",
"name": "Supplier",
"vat-number": "213456",
"expiration-date": "01/01/2020",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"address": "Address 1 Street",
"city": "Lisbon",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"address": "Address 1 Street",
"city": "San Francisco",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List SuppliersGET/api/v1/suppliers/{?access_token}
To list Suppliers. This action requires an access_token with productions_write scope. This service is paginated, returning 25 suppliers per page.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- page-size
numeric
(optional)number of results per page, default 25
- code
string
(optional)List suppliers filtered by code
Headers
Content-Type: application/json
200
Body
[
{
"id": 987356123,
"code": "Supplier",
"name": "Supplier",
"vat-number": "213456",
"expiration-date": "01/01/2020",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"address": "Address 1 Street",
"city": "Lisbon",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"address": "Address 1 Street",
"city": "San Francisco",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
},
{
"id": 987356124,
"code": "Supplier2",
"name": "Supplier2",
"number": "213457",
"expiration-date": "01/01/2020",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier3@supplier3.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier4@supplier4.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address3",
"name": "Address3",
"address": "Address 3 Street",
"city": "Paris",
"post-code": "111-111",
"state": "Paris",
"country": "FR",
"default": true
},
{
"code": "Address4",
"name": "Address4",
"address": "Address 4 Street",
"city": "Madrid",
"post-code": "111-111",
"state": "Madrid",
"country": "ES",
"default": false
}
]
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Retrieve a SupplierGET/api/v1/suppliers/{id}{?access_token}
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Supplier ID
Headers
Content-Type: application/json
200
Body
{
"id": 987356123,
"code": "Supplier",
"name": "Supplier",
"vat-number": "213456",
"expiration-date": "01/01/2020",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"address": "Address 1 Street",
"city": "Lisbon",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"address": "Address 1 Street",
"city": "San Francisco",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update a SupplierPUT/api/v1/suppliers/{id}{?access_token}
To update a Supplier provide a JSON hash of the attributes for the new Supplier.\
Contacts
-
The given supplier contacts will replace the current contacts.
-
If a contact with the same
name
as an existing contact is given, the contact with thatname
will have its values replaced by the ones given. -
If no contacts are given, the existing contacts will be removed.
Addresses
-
The given addresses will replace the current addresses.
-
If an address with the same
code
as an existing address is given, the address with thatcode
will have its values replaced by the ones given. -
If no addresses are given, the existing addresses wil be removed.
-
If an address has associated entities, the request will fail since the address cannot be removed.
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Supplier ID
Headers
Content-Type: application/json
Body
{
"code": "Supplier",
"name": "Supplier",
"vat-number": "213456",
"expiration-date": "2020-01-01T00:00:00Z",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"address": "Address 1 Street",
"city": "Lisbon",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"address": "Address 1 Street",
"city": "San Francisco",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
200
Body
{
"code": "Supplier",
"name": "Supplier",
"vat-number": "213456",
"expiration-date": "01/01/2020",
"contacts": [
{
"phone-number": "12345678",
"email": "supplier@supplier.com",
"name": "Contact1",
"default": true
},
{
"phone-number": "123456789",
"email": "supplier2@supplier2.com",
"name": "Contact2",
"default": false
}
],
"addresses": [
{
"code": "Address1",
"name": "Address1",
"address": "Address 1 Street",
"city": "Lisbon",
"post-code": "111-111",
"state": "Lisbon",
"country": "PT",
"default": true
},
{
"code": "Address2",
"name": "Address2",
"address": "Address 1 Street",
"city": "San Francisco",
"post-code": "111-111",
"state": "California",
"country": "US",
"default": false
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Remove a SupplierDELETE/api/v1/suppliers/{id}{?access_token}
Example URI
- access_token
string
(required)Fusion Operations API access token.
- id
numeric
(required)Supplier ID.
Headers
Content-Type: application/json
204
Body
Supplier was deleted
400
Body
It's not possible to delete this supplier. It has dependent entities.
Production Order ¶
Production Order resources of the Fusion Operations API.
Production Order ¶
A single Production Order object. The Production Order resource is one of the most important resources of the Fusion Operations API. It represents the management order to produce a predetermined quantity of products during a defined period by defined workers.
The Production Order resource has the following attributes:
-
id (supplied)
-
code (string, required) - production order code
-
start-date (date,required, format YYYY-MM-DDTHH:MM:SSZ) - date when this production order is scheduled to start
-
due-date (date,required, format YYYY-MM-DDTHH:MM:SSZ) - date when this production order is due
-
products (array, required, not empty) - products and quantities ordered
- product (string, required, unique) - Product Code
- quantity-ordered (integer, required, >0) - quantity ordered
- observations (optional) - note about this product
- quantity-produced (integer, supplied, >0) - quantity produced
-
shipping (optional)
- code (string) - shipping code for this order
- clientOrder (object, optional) - client order object
- code (string) - client order code
-
workers-assigned (array,optional) -
- number - worker number
-
machines (array,optional)
- code - machine code
-
serial-number (optional)
-
description (optional)
-
notes (optional)
-
status (supplied) - scheduled (before start_date and completeness = 0), onschedule (before end_date and completeness < 100%), delayed (after end_date completeness < 100%), completed (completeness >= 100%)
-
running-status (supplied) - notstarted (no productions), started (with productions), closed (manually closed or closed by completion), archived (manually archived)
The state id is assigned by the Fusion Operations API at the moment of creation.
Retrieve a Production OrderGET/api/v1/production-orders/{id}{?access_token}
Status: available
To retrieve a Production Order simply perform a GET request with the id of the Production Order.
This action requires an access_token
with productions_write
scope.
Example URI
- id
numeric
(required)Production Order ID.
- access_token
string
(required)Fusion Operations API access token.
- workers
boolean
(optional)show worker list on response
Headers
Content-Type: application/json
200
Body
{
"products": [
{
"product": "V23076",
"quantity-ordered": 3500,
"observations": "",
"quantity-produced": 700
}
],
"code": "V23076 - Semana 33/34",
"shipping": {
"code": "shipping 45"
},
"serial-number": "",
"description": "",
"start-date": "2016-04-20T09:15:15Z",
"due-date": "2016-05-16T17:15:15Z",
"workers-assigned": [
{
"number": 120
},
{
"number": 11
},
{
"number": 10
},
{
"number": 1
}
],
"ended": false,
"machines": [
{
"code": "A32"
},
{
"code": "F1"
}
],
"pieces-by-box": 20,
"status": "onschedule",
"running-status": "started",
"notes": "",
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
},
"id": 3990
}
Update/Replace a Production OrderPUT/api/v1/production-orders/{id}{?access_token}
Status: available soon
To update a Production Order simply perform a PUT request with the id of the Production Order.
This action requires an access_token
with productions_write
scope.
Example URI
- id
numeric
(required)Production Order ID.
- access_token
string
(required)Fusion Operations API access token.
- workers
boolean
(optional)show worker list on response
Headers
Content-Type: application/json
Body
{
"products": [
{
"product": "exampleProduct",
"quantity-ordered": 3,
"observations": "",
"parameters": [
{
"name": "Product Custom Field Name",
"value": "123"
},
{
"name": "Product Custom Field Name 2",
"value": "456"
}
]
}
],
"code": "exampleCode",
"shipping": {
"code": "shipping 45"
},
"serial-number": "",
"description": "",
"start-date": "2016-04-20T09:15:15Z",
"due-date": "2016-05-16T17:15:15Z",
"parameters": [
{
"name": "Custom Field Name",
"value": "123"
},
{
"name": "Custom Field Name 2",
"value": "456"
}
],
"workers-assigned": [
{
"number": 120
},
{
"number": 1
}
],
"worker-groups": [
{
"name": "exampleWorkerGroups"
}
],
"machines": [
{
"code": "A32"
},
{
"code": "F1"
}
],
"pieces-by-box": 25,
"notes": "",
"location": "location code"
}
200
Body
{
"products": [
{
"product": "exampleProduct",
"quantity-ordered": 3,
"observations": "",
"quantity-produced": 700,
"parameters": [
{
"name": "Product Custom Field Name",
"value": "123"
},
{
"name": "Product Custom Field Name 2",
"value": "456"
}
],
"serial-numbers": "serial1,serial2,serial3"
}
],
"code": "exampleCode",
"shipping": {
"code": "shipping 45",
"clientOrder": {
"code": "clientOrder 45"
}
},
"serial-number": "",
"description": "",
"start-date": "2016-04-20T09:15:15Z",
"due-date": "2016-05-16T17:15:15Z",
"parameters": [
{
"name": "Custom Field Name",
"value": "123"
},
{
"name": "Custom Field Name 2",
"value": "456"
}
],
"workers-assigned": [
{
"number": 120
},
{
"number": 11
},
{
"number": 10
},
{
"number": 1
}
],
"machines": [
{
"code": "exampleMachine"
},
{
"code": "F1"
}
],
"pieces-by-box": 25,
"status": "onschedule",
"running-status": "started",
"notes": "",
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
},
"id": 3990
}
Remove a ProductionOrderDELETE/api/v1/production-orders/{id}{?access_token}
Status: available
Example URI
- id
numeric
(required)Production Order ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
204
Create a Production OrderPOST/api/v1/production-orders/{?access_token}
Status: available To create a Production Order provide a JSON hash of the attributes for the new Production Order. This action requires an access_token with productions_write scope. For now only saving one Production Order is possible. In the future, if the request is an array instead of one resource, all items in the array will be saved.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- workers
boolean
(optional)show worker list on response
Headers
Content-Type: application/json
Body
{
"products": [
{
"product": "productExample",
"quantity-ordered": 4500,
"observations": "",
"parameters": [
{
"name": "Product Custom Field Name",
"value": "123"
},
{
"name": "Product Custom Field Name 2",
"value": "456"
}
]
}
],
"code": "exampleCode",
"shipping": {
"code": "shippingExample",
"clientOrder": {
"code": "clientOrderExample"
}
},
"serial-number": "",
"description": "",
"start-date": "2016-07-20T09:15:15Z",
"due-date": "2016-08-16T17:15:15Z",
"parameters": [
{
"name": "Custom Field Name",
"value": "123"
},
{
"name": "Custom Field Name 2",
"value": "456"
}
],
"workers-assigned": [
{
"number": 1
},
{
"number": 3
}
],
"worker-groups": [
{
"name": "All"
}
],
"ended": false,
"machines": [
{
"code": "exampleMachine"
},
{
"code": "F1"
}
],
"pieces-by-box": 20,
"notes": "",
"active": true,
"location": "location code",
"unique": true
}
201
Body
{
"products": [
{
"product": "productExample",
"quantity-ordered": 4500,
"observations": "",
"parameters" : [
{
"name" : "Product Custom Field Name",
"value" : "123"
},
{
"name" : "Product Custom Field Name 2",
"value" : "456"
}
],
"quantity-produced": 0
}
],
"code": "exampleCode",
"shipping": "shippingExample",
"serial-number": "",
"description": "",
"start-date": "2016-07-20T09:15:15Z",
"due-date": "2016-08-16T17:15:15Z",
"workers-assigned": [
{ "number": 1 },
{ "number": 2 }
{ "number": 3 }
{ "number": 4 }
],
"ended": false,
"machines": [
{"code": "exampleMachine"},
{"code": "F1"}
],
"pieces-by-box": 20,
"status": "scheduled",
"running-status": "notstarted",
"notes": "",
"active": true,
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
},
"id": 11110
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List Production OrdersGET/api/v1/production-orders/{?access_token}
Status: available
To list Production Orders. Multiple parameters will be treated as an AND condition.
This action requires an access_token with productions_write scope. This service is paginated, returning 25 OPs per page.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- start-date-before
date
(optional)List production orders with start date before this
- start-date-after
date
(optional)List production orders with start date after this
- due-date-before
date
(optional)List production orders with due date before this
- due-date-after
date
(optional)List production orders with due date after this
- running-status
string
(optional)notstarted, started, closed, archived
- active
boolean
(optional)List only active (true) or non-active (false) production orders
- product
string
(optional)Product Code
- machine
string
(optional)machine code
- workers
boolean
(optional)show worker list on response
Headers
Content-Type: application/json
200
Body
[{
"products": [
{
"product": "exampleProduct",
"quantity-ordered": 4500,
"observations": "",
"quantity-produced": 0
}
],
"code": "exampleCode",
"shipping": "Shipping 45",
"serial-number": "",
"description": "",
"start-date": "2016-07-20T09:15:15Z",
"due-date": "2016-08-16T17:15:15Z",
"workers-assigned": [
{ "number": 10 },
{ "number": 1 }
],
"ended": false,
"machines": [
{"code": "exampleMachine"},
{"code": "F1"}
],
"pieces-by-box": 20,
"status": "scheduled",
"running-status": "notstarted",
"notes": "",
"active": true,
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
"id": 8763990
}]
Notify a Production Order ProblemPOST/api/v1/production-orders/{id}/notify{?access_token}
Status: available
Service that posts a short-message on the feed and adds a message on the Production Order.
-
short-message (string,required) - message posted in the feed, max-length 140 chars
-
message (string,optional) - message added to the notes section in the PO
Example URI
- id
numeric
(required)Production Order ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"short-message": "example",
"message": "complete message "
}
200
Activate a Production OrderPOST/api/v1/production-orders/{id}/activate{?access_token}
Status: available
Service that activates the Production Order.
Example URI
- id
numeric
(required)Production Order ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{}
200
204
405
Body
This Production Order is closed or archived, please reopen it before activating it
Products ¶
Product resources of the Fusion Operations API.
Product ¶
A single Product object. The Product resource is one of the most important resources of the Fusion Operations API. It represents the products in a factory and contains the operations necessary to be produced. This method creates new Products and its Operations. Can also be used
The Product resource has the following attributes:
-
code (string, required) - Product Code
-
name (string, required) - product name
-
section (string, optional)
-
families (array, optional)
- code (string, required) - family code
-
color (string, optional) - color shortcut or hexadecimal or rgb
-
observations (string, optional) - product observations
-
notes (string, optional) - product notes
-
operations (array, optional) - operations to produce the product
- code (string, required) - operation code
- name (string, required) - operation name
- notes (string, optional) - operation notes
- waste (array, optional)
- code (string, required) - waste code
- task-durations (array, optional, max:1)
- validSince (date, required, format YYYY-MM-DDTHH:MM:SSZ) - date from when this duration is valid
- validUntil (date, required, format YYYY-MM-DDTHH:MM:SSZ) - date to when this duration is valid
- duration (time, optional, e.g. format “10H59m59s”) - the average time this operation takes to execute, in theory
- duration-customer (time, optional, e.g. format “10H59m59s”) - the time set in budget
- ratio-quantity (double, optional, default: 1.0) - the volume produced in each instance of this operation
- times-per-product (integer, optional, default: 1) - the number of times this operation has to be performed to complete a product unit
- checklists (array, optional)
- code (string, required) - checklist code
- machines (array, optional, must exist on the system) - machines that can be used to perform the operation
- code (string, required) - the machine code, already created in the system
- disabled (boolean, optional) - disable the operation
- optional (boolean, optional) - set the operation as optional
- recovery (boolean, optional) - set the operation as recovery
- no-time (boolean, optional) - do not register production times
- no-quantity (boolean, optional) - do not register production quantity
- as-team (boolean, optional) - operation to be performed as team
- multi-po (boolean, optional) - operation to be performed in multiple production orders
- print-production-barcode (boolean, optional) - print production barcode
- prepare-batch-order (boolean, optional) - prepare batch order
-
custom-fields (array, optional)
- code (string, required) - custom field code
- value (string, required) - custom field value
-
parameters (array, optional)
- name (string, required) - parameter name
- value (string, required) - parameter value
-
serializable (boolean, optional) - product is serializable
-
stock-min (double, optional) - minimum inventory
Fields not present in the request will be set with the default values. When using this method for existing products/operations, not present fields will be considered deletions.
Retrieve a ProductGET/api/v1/products/{code}{?access_token}
Status: available
To retrieve a Product simply perform a GET request with the code of the Product.
This action requires an access_token
with productions_write
scope.
Example URI
- code
String
(required)Product code.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
200
Body
{
"code": "P11",
"name": "Product 11",
"section": null,
"families": null,
"color": "#8b0000",
"observations": "observations",
"operations": [
{
"code": "op1",
"name": "op1",
"waste": null,
"task-durations": [
{
"validSince": "01/01/2022 - 13:00",
"validUntil": "01/01/2100 - 13:00",
"duration": "00H01m00s",
"duration-customer": "00H01m00s",
"ratio-quantity": 1
}
],
"custom-fields": null,
"machines": null,
"disabled": false,
"optional": false,
"recovery": null,
"no-time": false,
"no-quantity": false,
"as-team": false,
"max-waste-threshold": null,
"section": {
"name": "specialsection"
},
"id": 100
}
],
"custom-fields": null,
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"label": {
"code": "labelCode"
},
"serializable": true
}
404
Body
If product with the provided code doesn't exist.
Create a ProductPOST/api/v1/products/{?access_token}
Status: available
To create a Product provide a JSON hash of the attributes for the new Product and its Operations. This action requires an access_token with productions_write scope. Multiple Operations can be created at once.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"code": "P11",
"name": "Product 11",
"families": [
{
"code": "FG"
}
],
"color": "#8b0000",
"observations": "observations",
"operations": [
{
"code": "op1",
"name": "op1",
"waste": [
{
"code": "BROKEN"
}
],
"task-durations": [
{
"validSince": "01/01/2022 - 13:00",
"validUntil": "01/01/2100 - 13:00",
"duration": "00H01m00s",
"duration-customer": "00H01m00s",
"ratio-quantity": 1
}
],
"times-per-product": 2,
"checklists": [
{
"code": "CheckIn"
}
],
"machines": [
{
"code": "OVEN02"
}
],
"disabled": false,
"optional": false,
"recovery": false,
"no-time": false,
"no-quantity": false,
"as-team": false,
"multi-po": false,
"print-production-barcode": false,
"prepare-batch-order": false,
"section": {
"name": "CUT"
}
}
],
"custom-fields": null,
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
}
],
"serializable": true
}
201
Body
{
"code": "P11",
"name": "Product 11",
"families": [
{
"code": "FG"
}
],
"color": "#8b0000",
"observations": "observations",
"operations": [
{
"code": "op1",
"name": "op1",
"waste": [
{
"code": "BROKEN"
}
],
"task-durations": [
{
"validSince": "01/01/2022 - 13:00",
"validUntil": "01/01/2100 - 13:00",
"duration": "00H01m00s",
"duration-customer": "00H01m00s",
"ratio-quantity": 1
}
],
"times-per-product": 2,
"checklists": [
{
"code": "CheckIn"
}
],
"machines": [
{
"code": "OVEN02"
}
],
"disabled": false,
"optional": false,
"recovery": false,
"no-time": false,
"no-quantity": false,
"as-team": false,
"multi-po": false,
"print-production-barcode": false,
"prepare-batch-order": false,
"section": {
"name": "CUT"
}
}
],
"custom-fields": null,
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
}
],
"serializable": true
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update ProductPUT/api/v1/products/{code}{?access_token}
Status: available
To update a Product provide a code and a JSON hash of attributes for the existing Product and its Operations. This action requires an access_token with productions_write scope. For now only saving one Product is possible, but multiple Operations can be created at once.
Example URI
- code
string
(required)Product code.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"code": "P11",
"name": "Product 11",
"operations": [
{
"code": "op1",
"name": "op1",
"section": {
"name": "specialsection"
}
}
],
"color": "color shortcut or hexadecimal or rgb",
"observations": "observations text",
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"label": {
"code": "Label 1"
}
}
201
Body
{
"code": "P11",
"name": "Product 11",
"section": null,
"families": null,
"color": "#8b0000",
"observations": "observations",
"operations": [
{
"code": "op1",
"name": "op1",
"waste": null,
"task-durations": [
{
"validSince": "01/01/2022 - 13:00",
"validUntil": "01/01/2100 - 13:00",
"duration": "00H01m00s",
"duration-customer": "00H01m00s",
"ratio-quantity": 1
}
],
"custom-fields": null,
"machines": null,
"disabled": false,
"optional": false,
"recovery": null,
"no-time": false,
"no-quantity": false,
"as-team": false,
"max-waste-threshold": null,
"section": {
"name": "specialsection"
},
"id": 123
}
],
"label": {
"code": "Label 1"
},
"custom-fields": null,
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Delete ProductDELETE/api/v1/products/{code}{?access_token}
Status: available
To delete a Product provide the Product code.
Example URI
- code
string
(required)Product code.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
Content-Type: application/json
204
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List ProductsGET/api/v1/products/{?access_token}
Status: available To list Products and its Operations. This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- product-family-code
string
(optional)List products that belong to the provided product family
- modification-date
date
(optional)List products that were modified through the backoffice after the provided date
Headers
Content-Type: application/json
200
Body
{
"code": "P11",
"name": "Product 11",
"section": null,
"families": null,
"operations": [
{
"code": "op1",
"name": "op1",
"waste": null,
"task-durations": [
{
"validSince": "01/01/2022 - 13:00",
"validUntil": "01/01/2100 - 13:00",
"duration": "00H01m00s",
"duration-customer": "00H01m00s",
"ratio-quantity": 1
}
],
"custom-fields": null,
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"machines": null,
"disabled": false,
"optional": false,
"recovery": null,
"no-time": false,
"no-quantity": false,
"as-team": false,
"max-waste-threshold": null,
"section": {
"name": "specialsection"
},
"id": 123
}
],
"label": {
"code": "Label 1"
},
"custom-fields": null
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Product BoM ¶
The Product’s Bill of Materials (BoM) resource stipulates the materials used to manufacture a specific product. The BoM has the following attributes:
-
product-code - main product
-
bom (array,required)
- product-code (string, required) - component/consumption Product Code
- quantity (double, required) - quantity
- operation-code (string, optional) - operation code where the material defined in the product-code is consumed. If empty, the consumption will occur on the first operation of the manufacturing process for this product.
Update the Product BoMPOST/api/v1/bom{?access_token}
Status: Available
To update the Bill of Materials of a Product, provide a JSON hash of the attributes for the new Product and its Operations. This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"product-code": "bicycle",
"bom": [
{
"product-code": "wheel",
"quantity": 2,
"operation-code": "assemble"
},
{
"product-code": "seat",
"quantity": 1,
"operation-code": "assemble"
}
]
}
201
Body
{
"product-code": "bicycle",
"bom": [
{
"product-code": "wheel",
"quantity": 2,
"operation-code": "assemble"
},
{
"product-code": "seat",
"quantity": 1,
"operation-code": "assemble"
}
]
}
404
Body
Main product not found
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Product Families ¶
Product resources of the Fusion Operations API.
Product Family ¶
The ProductFamily object represents the family or families a product belongs to.
The ProductFamily resource has the following attributes:
-
code (string, required) - product family code
-
name (string, required) - product family name
Create a Product FamilyPOST/api/v1/product-families/{?access_token}
Status: available
To create one or more Product Families· This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"product-families": [
{
"code": "FAM 1",
"name": "Family 1"
},
{
"code": "FAM 2",
"name": "Family 2"
}
]
}
201
Body
[
{
"code": "FAM 1",
"name": "Family 1"
},
{
"code": "FAM 2",
"name": "Family 2"
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update Product FamilyPUT/api/v1/product-families/{code}{?access_token}
Status: under development
Under development
Example URI
- code
string
(required)Product code.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
under development
}
201
Body
{
under development
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Delete Product FamilyDELETE/api/v1/product-families/{code}{?access_token}
Status: available
To delete a Product Family provide the ProductFamily code
Example URI
- code
string
(required)Product code.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
Content-Type: application/json
204
Body
Product Family was deleted
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List Product FamiliesGET/api/v1/product-families/{?access_token}
Status: available To list the Product Families. This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
Headers
Content-Type: application/json
201
Body
[
{
"code": "FAM 1",
"name": "Family 1"
},
{
"code": "FAM 2",
"name": "Family 2"
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Machines ¶
Production resources of the Fusion Operations API.
Simple Machine API Authentication
If it’s not possible to use the regular authentication for a machine integration, you can create authentication tokens to allow machines to access certain endpoints of the API.
These tokens can be generated by going to the Simple Machine API Authentication in the Integrations page. In there, you can generate an authentication token for a machine.
You can then pass this token in the machine_token
parameter instead of using the access_token
. The machine_token
must match the authentication token of the machine passed in the machine_code
parameter. If the tokens do not match, the request will be unauthorized.
This is only avaiable for the Counter and Downtime endpoints of the Machine resource. This authentication method is less secure than the standard, so please only use it if necessary.
Counter ¶
Status: available
Update counterPOST/api/v1/machines/{machine_code}/counter{?access_token}
To update the current counter in the machine, just send in the following request. For simplifying machine connection you can either use the access_token or send api credentials in the autentication header with basic autentication. Fusion Operations will automatically update the production started by the worker on that machine. Both the quantity count and waste quantities must be incremental (i.e. always greater than the previously sent quantities).
Example URI
- access_token
string
(required)Fusion Operations API access token.
- machine_code
string
(required)Machine code defined in Fusion Operations platform
Headers
Content-Type: application/json
Body
{
"count": 500,
"waste": [
{
"code": "Waste1",
"quantity": 20
}
],
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
]
}
200
Body
Returns the new value for the machine's counter.
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Downtime ¶
Status: available
Update downtimePOST/api/v1/machines/{machine_code}/startstop{?access_token}
To update the current status in the machine, just send in the following request. For simplifying machine connection you can either use the access_token or send api credentials in the autentication header with basic autentication. Fusion Operations will automatically register a downtime or end it, according to the information received. Send 0 for machine stopped, 1 if it is on and specify the downtime type.
To update a machine status, specify the following attributes:
-
type (string, required, must be a downtime type already assigned to the machine) - the Downtime type
-
running (number, required, 0 or 1) - is the machine stopped (0) or running (1)
Example URI
- access_token
string
(required)Fusion Operations API access token.
- machine_code
string
(required)Machine code defined in Fusion Operations platform
Headers
Content-Type: application/json
Body
{
"type": "Maintenance",
"running": 0
}
200
Production ¶
Production resources of the Fusion Operations API.
Production ¶
A single Production object. The Production resource is the central resource of the Fusion Operations API. It represents the labour from one worker in a position during a period of time.
The Production resource has the following attributes:
-
id
-
start-time (date,required, format YYYY-MM-DDTHH:MM:SSZ) - production start time
-
end-time (date,required, format YYYY-MM-DDTHH:MM:SSZ) - production end time
-
work-time (duration,given, format 00H00m00s) - production work time (within schedule time/punch clocks and excluding downtimes)
-
production-order(optional) - production order for which this production was done
- code (string, required) - production order code
- id (string, required) - production order code
-
operation (required) - task that was executed in this production
- code (string, required, unique) - task code
- product (required) - the material good that the worker is working in this position
-
quantity (integer, required, >0) - quantity produced in this production
-
worker (required) - a person that performs tasks
- number (long, required, unique) - worker number
-
produced-waste (array, optional) - defective material output in an operation
- quantity (numeric, required) - waste code
- waste - type of defective material
- code (string, required, unique) - waste code
- description (string, required) - waste description
- flaw (string, required) - waste type
- quantity (integer, required) - amount of waste produced
The state id is assigned by the Fusion Operations API at the moment of creation.
Create a ProductionPOST/api/v1/productions/{?access_token}
Status: available
To create a new Production simply provide a JSON hash of the attributes for the new Production.
This action requires an access_token
with productions_write
scope. If there’s a Production unique attribute, the Production attribute will be updated.
If the request is an array instead of one resource, the items in the array will be saved.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"shipping": {
"code": "shippingExampleCode00"
},
"production-order": {
"code": "productionExampleCode00"
},
"operation": {
"product-code": "productExampleCode",
"code": "exampleOperation00"
},
"worker": {
"number": "1000"
},
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"quantity": 100,
"start-time": "2016-07-20T09:15:15Z",
"end-time": "2016-07-20T09:15:16Z",
"lot-number": "lotExample",
"finished": false,
"location": "location code"
}
200
Body
{
"id": 4629378,
"production-order": {
"code": "productionExampleCode00",
"id": 365315
},
"shipping": {
"code": "shippingExampleCode00",
"id": 41741
},
"operation": {
"code": "exampleOperation00",
"product-code": "productExampleCode00",
"id": 790486
},
"worker": {
"number": 1000,
"name": "Worker Example",
"id": 15890
},
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"quantity": 100,
"lot-number": "lotExample",
"start-time": "2016-07-20T09:15:15.000Z",
"end-time": "2016-07-20T09:15:16.000Z",
"finished": false,
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Update a ProductionPUT/api/v1/productions/{id}{?access_token}
Status: available
To update a Production provide a code and a JSON hash of attributes for the existing Production.
This action requires an access_token with productions_write scope.
For now only saving one Product is possible, but multiple Operations can be created at once.
Example URI
- id
numeric
(required)Production ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"shipping": {
"code": "shippingexamplecode00"
},
"production-order": {
"code": "productionorderexample00"
},
"operation": {
"product-code": "otherProductCode",
"code": "OtherOperationCode"
},
"worker": {
"number": "1000"
},
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"quantity": 100,
"start-time": "2016-07-20T09:15:15Z",
"end-time": "2016-07-20T09:15:16Z",
"lot-number": "other lot",
"finished": false,
"location": "location code"
}
200
Body
{
"id": 4629374,
"production-order": {
"code": "productionorderexample00",
"id": 365315
},
"shipping": {
"code": "shippingexamplecode00",
"id": 41741
},
"operation": {
"code": "OtherOperationCode",
"product-code": "otherProductCode",
"id": 790486
},
"worker": {
"number": 1000,
"name": "Worker Name",
"id": 15890
},
"parameters": [
{
"name": "parameter1",
"value": "value1"
},
{
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
},
{
"name": "parameter3",
"value": 1
}
],
"quantity": 100,
"lot-number": "other lot",
"start-time": "2016-07-20T09:15:15.000Z",
"end-time": "2016-07-20T09:15:16.000Z",
"finished": false,
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
Delete ProductionDELETE/api/v1/productions/{id}{?access_token}
Status: available
To delete a Production provide a production ID.
Example URI
- id
numeric
(required)Production ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
Content-Type: application/json
201
Body
The deleted production will be returned
{
"id": 4629376,
"production-order": {
"code": "productionorderexample00",
"id": 365315
},
"shipping": {
"code": "shippingexamplecode00",
"id": 41741
},
"operation": {
"code": "operationexample0001",
"product-code": "productcodeexample001",
"id": 790486
},
"worker": {
"number": 1000,
"name": "worker example",
"id": 15890
},
"parameters": [{
"name": "parameter1",
"value": "value1"
}, {
"name": "parameter2",
"value": "2022-12-19T00:00:00Z"
}, {
"name": "parameter3",
"value": 1.0
}],
"quantity": 100.0,
"lot-number": "lotX",
"start-time": "2016-07-20T09:15:15.000Z",
"end-time": "2016-07-20T09:15:16.000Z",
"finished": false,
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body
List ProductionsGET/api/v1/productions/{?access_token}
Status: available
To list Productions. Multiple parameters will be treated as an AND condition.
This action requires an access_token with productions_write scope. This service is paginated, returning 25 productions per page.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- production-order-id
numeric
(optional)List productions with this production-order
- production-order-code
string
(optional)List productions with this (or these) production-order(s)
- worker
numeric
(optional)List productions with this worker (worker number)
- start-time-before
date
(optional)List productions with start time before this
- start-time-after
date
(optional)List productions with start time after this
- end-time-before
date
(optional)List productions with end time before this
- end-time-after
date
(optional)List productions with end time after this
- start-time
date
(optional)List productions which were running after this start-time (don’t use combined with -before -after)
- checked-out
boolean
(optional)List productions which are checked out.
- worker-name
boolean
(optional)retrieves the worker name and number instead of just the number of the worker.
Headers
Content-Type: application/json
200
Body
[
{
"production-order": {
"code": "PO1",
"id": 36530
},
"operation": {
"code": "2",
"product": "Product 1"
},
"worker": {
"number": 2
},
"machine": {
"code": "Machine Code"
},
"produced-waste": [
{
"quantity": 21,
"waste": {
"code": "Waste code",
"description": "Description of this type of waste",
"flaw": "Flaw",
"recoverable": true,
"billable": false,
"id": 333
}
}
],
"parameters": [
{
"parameter1": "value1"
},
{
"parameter2": 2
}
],
"quantity": 0,
"checked-out": false,
"work-time": "00H00m00s",
"start-time": "2016-09-20T17:55:32.000+01:00",
"end-time": "2016-09-20T18:45:00.000+01:00",
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
},
"id": 575354
}
]
DownTime ¶
DownTime resources of the Fusion Operations API.
DownTimes ¶
List DownTimesGET/api/v1/downtimes{?access_token}
Status: available
To list DownTimes. Multiple parameters will be treated as an AND condition.
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- start-time-before
date
(optional)List downtimes with start time before this
- start-time-after
date
(optional)List downtimes orders with start time after this
- end-time-before
date
(optional)List downtimes with end time before this
- end-time-after
date
(optional)List downtimes with end time after this
- machine
numeric
(optional)List downtimes on this machine
Headers
Content-Type: application/json
200
Body
[
{
"id": 20146,
"start-time": "2017-12-21T10:30:21.000Z",
"end-time": "2017-12-21T10:32:21.000Z",
"started-by": {
"number": 2
},
"closed-by": {
"number": 2
},
"workers": [],
"machines": [
{
"code": "M2",
"name": "Machine 2"
}
],
"product": "ProdX",
"production-order": "OP XPTO",
"checked-out": true,
"downtime-type": "Malfunction",
"time-spent": "00H02m00s"
}
]
PunchClock ¶
PunchClock resources of the Fusion Operations API.
PunchClock ¶
Webhooks are available for punch clock events from the integrations menu in the app. In order to use this feature, please add the endpoint URL callback with the notification events you want to listen to. We strive to send webhook notifications as quickly as events occur in our system. Currently, we don’t support any retries and the webhook request timeout is 10 seconds.
List PunchClocksGET/api/v1/punchclocks{?access_token}
Status: available
To list PunchClocks. Multiple parameters will be treated as an AND condition.
This action requires an access_token with productions_write scope.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- date-before
date
(optional)List punch clock entries with date before this
- date-after
date
(optional)List punch clock entries with date after this
- worker
numeric
(optional)List punch clock entries for this worker
Headers
Content-Type: application/json
200
Body
[
{
"id": 372179,
"date": "2018-09-21T09:24:06.000+01:00",
"worker": {
"number": 2
},
"type": 1
},
{
"id": 372180,
"date": "2018-09-21T16:34:12.000+01:00",
"worker": {
"number": 2
},
"type": 0
}
]
"type": 0 ('out') or 1 ('in')
Inventory Movement ¶
Inventory Movement resources of the Fusion Operations API.
inventory Movement ¶
A single Inventory Movement object. The Inventory Movement resource is one of the most important resources of the Fusion Operations API.
The Inventory Movement resource has the following attributes:
-
id (supplied)
-
product (string, required) - Product Code
-
date-time (date, optional, format YYYY-MM-DDTHH:MM:SSZ) - date when inventory movement is created
-
quantity (double, required) - inventory movement quantity
-
type (string, required) - inventory movement type: in,out,consumption,production
-
lot (string, optional) - inventory movement lot to use
-
total-cost (bigdecimal, optional) - inventory movement total cost for the quantity
-
warehouse-location (string, optional) - warehouse location code. When empty, Fusion Operations defaults to the Production warehouse.
-
warehouse (string, optional) - warehouse code. When empty, Fusion Operations defaults to the Production warehouse location.
-
location (string, optional) - location, if multisite
-
comment (string, optional) - inventory movement comment
Retrieve an Inventory MovementGET/api/v1/inventory-movements/{id}{?access_token}
Status: available
To retrieve an Inventory Movement simply perform a GET request with the id of the Inventory Movement.
This action requires an access_token
with productions_write
scope.
Example URI
- id
numeric
(required)Inventory Movement ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
200
Body
{
"product-code": "ProductCode",
"date-time": "2018-07-20T09:15:15Z",
"quantity": "10",
"type": "in",
"lot": "A",
"total-cost": "1000",
"comment": "OK",
"warehouse-location": "Zone2",
"shipping": {
"code": "shippingCode",
"clientOrder": {
"code": "clientOrderCode",
"client": "clientCode"
},
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
},
"receiving": {
"code": "receivingCode",
"purchaseOrder": {
"code": "purchaseOrderCode",
"supplier": "supplierCode"
},
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
}
}
Create Inventory MovementPOST/api/v1/inventory-movements/{?access_token}
Status: available
To create an Inventory Movement provide a JSON hash of the attributes for the new Inventory Movement.
This action requires an access_token
with productions_write scope
.
For now only saving one Inventory Movement is possible. In the future, if the request is an array instead of one resource, all items in the array will be saved.
Example URI
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"product-code": "ProductCode",
"date-time": "2018-07-20T09:15:15Z",
"quantity": "10",
"type": "in",
"lot": "A",
"total-cost": "1000",
"comment": "OK",
"warehouse": "A",
"warehouse-location": "Zone2",
"shipping": "shippingCode",
"client-order": "clientOrderCode",
"receiving": "receivingCode",
"purchase-order": "purchaseOrderCode",
"location": "location code"
}
200
Body
{
"product-code": "ProductCode",
"date-time": "2018-07-20T09:15:15Z",
"quantity": "10",
"type": "in",
"lot": "A",
"total-cost": "1000",
"comment": "OK",
"warehouse-location": "Zone2",
"id": 12345,
"shipping": {
"code": "shippingCode",
"clientOrder": {
"code": "clientOrderCode",
"client": "clientCode"
},
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
},
"receiving": {
"code": "receivingCode",
"purchaseOrder": {
"code": "purchaseOrderCode",
"supplier": "supplierCode"
},
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
}
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body.
Update Inventory MovementPUT/api/v1/inventory-movements/{id}{?access_token}
Status: available
To update an Inventory Movement provide a JSON with the attributes that you want to update in the Inventory Movement (all attributes are optional).
This action requires an access_token
with productions_write scope
.
Example URI
- id
numeric
(required)Inventory Movement ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
Body
{
"product-code": "ProductCode",
"date-time": "2018-07-20T09:15:15Z",
"quantity": "10",
"type": "in",
"lot": "A",
"total-cost": "1000",
"comment": "OK",
"warehouse": "A",
"warehouse-location": "Zone2",
"receiving": "receivingCode"
}
200
200
200
Body
If there's a problem with the request, the problem found will be reported on the Response Body.
Delete Inventory MovementDELETE/api/v1/inventory-movements/{id}{?access_token}
Status: available
To delete an Inventory Movement provide the Inventory Movement ID.
Example URI
- id
numeric
(required)Inventory Movement ID.
- access_token
string
(required)Fusion Operations API access token.
Headers
Content-Type: application/json
200
200
List Inventory MovementsGET/api/v1/inventory-movements/{?access_token}
Status: available
To list Inventory Movements. Multiple parameters will be treated as an AND condition.
This action requires an access_token
with productions_write
scope. This service is paginated, returning 25 IMs per page.
Example URI
- access_token
string
(required)Fusion Operations API access token.
- page
numeric
(optional)result page index, starting in 1
- product-code
string
(optional)Product Code
- type
string
(optional)inventory movement type: in,out,consumption,production
Headers
Content-Type: application/json
200
Body
[
{
"product-code": "ProductCode",
"date-time": "2018-07-20T09:15:15Z",
"quantity": "10",
"type": "in",
"lot": "A",
"total-cost": "1000",
"comment": "OK",
"warehouse-location": "Zone2",
"id": 12345,
"shipping": {
"code": "shippingCode",
"clientOrder": {
"code": "clientOrderCode",
"client": "clientCode"
},
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
},
"receiving": {
"code": "receivingCode",
"purchaseOrder": {
"code": "purchaseOrderCode",
"supplier": "supplierCode"
},
"location": {
"id": "location id",
"code": "location code",
"name": "location name"
}
}
}
]
Inventory ¶
Inventory resources of the Fusion Operations API.
Inventory ¶
The Inventory resource stipulates the stock available for a specific product.
-
product-code (string)
-
stock (double, required)
-
date (date, optional) - date of the stock count
Retrieve Product InventoryGET/api/v1/stock/
Status: available
To retrieve a Product Inventory simply perform a GET request with the code of the Product. Multiple parameters will be treated as an AND condition.
This action requires an access_token
with productions_write scope
.
Example URI
Headers
Content-Type: application/json
200
Body
{
"product-code": "Example",
"stock": 35,
"lot": [
{
"code": "A",
"stock": 10
},
{
"code": "B",
"stock": 5
}
]
}
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body.
Reports ¶
Reporting resources of the Fusion Operations API.
Worker labor time ¶
Worker Labor TimeGET/api/v1/reports/worker-labor-time{?access_token}
Status: available
To retrieve a report simply perform a GET request with time interval to extract the report. You can add worker and section parameter to filter the report. Besides that, you can specify some flags to customize the report content. The default value of all flags is false.
This action requires an access_token
with productions_write scope
.
Example URI
- start-time
string
(required)Generate report to dates after this (included)
- end-time
string
(required)Generate report to dates before this (included)
- access_token
string
(required)Fusion Operations API access token
- worker-number
string
(optional)Specify a worker number to filter the report
- section
string
(optional)Specify a section name. All workers from this section will be included in the report
- show-rework
boolean
(optional)Include a new field with rework operations in the report
- show-weekend
boolean
(optional)Include a weekend days in data
- only-punch-clock
boolean
(optional)Only consider presence time with punch clock entries
- page
numeric
(optional)result page index, starting in 1
Headers
Content-Type: application/json
200
Body
[
{
"worker": {
"number": "0",
"name": "John"
},
"presence-time": "08H00",
"work-time": "04H00m00s",
"percentage": "50%",
"calendar-downtimes": "00H00m00s"
},
{
"worker": {
"number": "1",
"name": "Mary"
},
"presence-time": "08H00",
"work-time": "08H00m00s",
"percentage": "100%",
"calendar-downtimes": "00H00m00s"
}
]
400
Body
If there's a problem with the request, the problem found will be reported on the Response Body.
429
Body
Another request is ongoing for this endpoint. Please wait until the current request finishes before doing another.
Webhooks ¶
Webhooks are available to receive events from Fusion Operations in a destination system. They can be configurated from the Integrations Menu in Fusion Operations. To use this feature, please add the endpoint URL where you want to receive the webhook (HTTP request). You can select multiple events that will send webhooks to the specified endpoint. We strive to send webhook notifications as just after the event occur in our system. If you have many interactions with Fusion Operations that generates webhooks, you may get a flood of notifications delivered within a brief period. Currently, we don’t support any retry process and the webhook request timeout is 10 seconds.
Example
-
Request (application/json)
-
Headers - Besides the fixed headers, more specific header can be added to the webhook. The header name and value should be defined in the webhook edit page.
x-prodsmart-topic: {TYPE_OF_WEBHOOK} x-prodsmart-hmac-sha1: "c938fe31379c0d89b37468e1cae9e3aab2d56834" x-prodsmart-api-version: "1" x-prodsmart-webhook-uuid: "91cb972d-b476-4936-947c-4be471b9da5b" x-prodsmart-triggered-at: "2023-08-29T20:39:46.142Z"
-
Body - The body of the webhook will depend based on the notification type.
{ "production-order": { "code": "Table_2", "id": 987 }, "operation": { "code": "Paint" }, "product": { "id": 123, "code": "Table" }, "worker": { "id": 20804, "number": 0, "name": "Zero" }, "machine": {}, "quantity": 7, "finished": true, "lot": {}, "cost": 0, "produced-waste": [], "parameters": [], "consumptions": [ { "product": { "id": 333, "code": "RawMaterial" }, "lot": {}, "date": "2023-12-21T11:39:43.000Z", "quantity": 7, "cost": 0, "id": 222 } ], "total-time-factor": 1, "rework": false, "start-time": "2023-12-21T11:39:43.000Z", "end-time": "2023-12-21T11:39:43.000Z", "is-serializable": false, "id": 111 }
x-prodsmart-topic - Identify topic of the webhook
x-prodsmart-hmac-sha1 - Used to verify the origin the webhook
x-prodsmart-api-version - Version of the API used to send the webhook
x-prodsmart-webhook-uuid - Identify unique webhook
x-prodsmart-triggered-at - Time that the webhook was triggered
-
How to verify the webhook?
-
Before responding with a 200 status code, it’s crucial to confirm that the webhook originated from Fusion Operations. This verification is achieved by computing a signature.
-
Every webhook request comes with a specific header called x-prodsmart-hmac-sha1, which is encoded in base64 format. This header is generated using both the API secret and the data included in the webhook request.
-
To verify the authenticity of the webhook, you need to calculate a signature yourself using the same API secret and the provided data.
-
Once you have the computed signature, compare it to the value found in the x-prodsmart-hmac-sha1 header of the incoming webhook request.
-
If the computed signature matches the value in the x-prodsmart-hmac-sha1 header, you can be confident that the webhook was indeed sent from Fusion Operations and can proceed with responding to it with a 200 status code.
Webhook types
Production order created
This type of webhook will be triggered when a Production Order is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_order_created
-
Body
{ "products": [ { "product": "V23076", "quantity-ordered": 3500, "observations": "", "quantity-produced": 700 } ], "code": "Test Production Order", "shipping": { "code": "shipping 45" }, "serial-number": "", "description": "", "start-date": "2016-04-20T09:15:15Z", "due-date": "2016-05-16T17:15:15Z", "workers-assigned": [ { "number": 120 }, { "number": 11 }, { "number": 10 }, { "number": 1 } ], "ended": false, "machines": [ { "code": "A32" }, { "code": "F1" } ], "pieces-by-box": 20, "status": "onschedule", "running-status": "started", "notes": "", "id": 1 }
running-status
possible values:- notstarted
status
possible values:- delayed
- onschedule
-
Production order updated
This type of webhook will be triggered when a Production Order is changed.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_order_updated
-
Body
{ "products": [ { "product": "V23076", "quantity-ordered": 3500, "observations": "", "quantity-produced": 700 } ], "code": "Test Production Order Updated", "shipping": { "code": "shipping 45" }, "serial-number": "", "description": "", "start-date": "2018-04-20T09:15:15Z", "due-date": "2016-05-16T17:15:15Z", "workers-assigned": [ { "number": 120 }, { "number": 11 } ], "ended": false, "machines": [ { "code": "A32" } ], "pieces-by-box": 20, "status": "onschedule", "running-status": "started", "notes": "", "id": 1 }
running-status
possible values:- archived
- closed
- started
- notstarted
status
possible values:- scheduled
- delayed
- completed
- onschedule
-
Production order deleted
This type of webhook will be triggered when a Production Order is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_order_deleted
-
Body
{ "id": 1 }
-
Production order started
This type of webhook will be triggered when a production related to a Production Order is started. This webhook is sent together with PRODUCTION_CREATE webhook.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_order_started
-
Body
{ "products": [ { "product": "V23076", "quantity-ordered": 3500, "observations": "", "quantity-produced": 700 } ], "code": "Test Production Order Updated", "shipping": { "code": "shipping 45" }, "serial-number": "", "description": "", "start-date": "2018-04-20T09:15:15Z", "due-date": "2016-05-16T17:15:15Z", "workers-assigned": [ { "number": 120 }, { "number": 11 } ], "ended": false, "machines": [ { "code": "A32" } ], "pieces-by-box": 20, "status": "onschedule", "running-status": "started", "notes": "", "id": 1 }
running-status
possible values:- started
status
possible values:- delayed
- completed
- onschedule
-
Production order completed
This type of webhook will be triggered when the last production of a Production Order is completed.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_order_completed
-
Body
{ "products": [ { "product": "V23076", "quantity-ordered": 3500, "observations": "", "quantity-produced": 700 } ], "code": "Test Production Order Updated", "shipping": { "code": "shipping 45" }, "serial-number": "", "description": "", "start-date": "2018-04-20T09:15:15Z", "due-date": "2016-05-16T17:15:15Z", "workers-assigned": [ { "number": 120 }, { "number": 11 } ], "ended": false, "machines": [ { "code": "A32" } ], "pieces-by-box": 20, "status": "onschedule", "running-status": "started", "notes": "", "id": 1 }
running-status
possible values:- archived
- closed
- started
- notstarted
status
possible values:- scheduled
- delayed
- completed
- onschedule
-
Purchase order created
This type of webhook will be triggered when a Purchase order is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: purchase_order_created
-
-
Body
[{ "id": 1, "code": "PuO1", "creation-date": "2025-01-01T10:00:00Z", "suplier": { "id": 1, "code": "S1", "name": "Supplier 1", "vat-number": "123456789", "phone-number": "123456789", "email": "email@email.com", "expiration-date": "2027-01-01", "contacts": [{ "name": "Contact 1", "phone-number": "123456789", "email": "email@email.com", "default": true }], "addresses": [{ "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true },{ "code": "A2", "name": "Address 2", "address": "Address 2", "city": "City 2", "post-code": "123456", "state": "State 2", "country": "Country 2", "default": false }] }, "billing-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "observations": "Observations", "notes": "Notes", "external-notes": "External notes", "receivings": [{ "id": 1, "code": "R1", "requested-date": "2025-01-01T10:00:00Z", "due-date": "2025-01-10T10:00:00Z", "delivery-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "cost": 100.0, "shipping-cost": 0.0, "products": [{ "id": 1, "code": "P1", "name": "P1 name", "quantity": 1, "uom": { "code": "U1", "name": "U1 name" }, "cost": 100.0, "observations": "Observations", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }] }], "parameters": [{ "name": "parameterName", "value": "parameterValue" }], "approval-status": "approved", "cost": 100.0, "archived": false, "ended": false, "active": true }]
Purchase order updated
This type of webhook will be triggered when a Purchase order is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: purchase_order_updated
-
-
Body
[{ "id": 1, "code": "PuO1", "creation-date": "2025-01-01T10:00:00Z", "suplier": { "id": 1, "code": "S1", "name": "Supplier 1", "vat-number": "123456789", "phone-number": "123456789", "email": "email@email.com", "expiration-date": "2027-01-01", "contacts": [{ "name": "Contact 1", "phone-number": "123456789", "email": "email@email.com", "default": true }], "addresses": [{ "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true },{ "code": "A2", "name": "Address 2", "address": "Address 2", "city": "City 2", "post-code": "123456", "state": "State 2", "country": "Country 2", "default": false }] }, "billing-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "observations": "Observations", "notes": "Notes", "external-notes": "External notes", "receivings": [{ "id": 1, "code": "R1", "requested-date": "2025-01-01T10:00:00Z", "due-date": "2025-01-10T10:00:00Z", "delivery-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "cost": 100.0, "shipping-cost": 0.0, "products": [{ "id": 1, "code": "P1", "name": "P1 name", "quantity": 1, "uom": { "code": "U1", "name": "U1 name" }, "cost": 100.0, "observations": "Observations", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }] }], "parameters": [{ "name": "parameterName", "value": "parameterValue" }], "approval-status": "approved", "cost": 100.0, "archived": false, "ended": false, "active": true }]
Purchase order deleted
This type of webhook will be triggered when a Purchase order is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: purchase_order_deleted
-
Body
[{ "id": 1 }]
-
Purchase order closed
This type of webhook will be triggered when a Production is check-out (partial or total), except no time operations.
-
Request (application/json)
-
Headers
x-prodsmart-topic: purchase_order_closed
-
-
Body
[{ "id": 1, "code": "PuO1", "creation-date": "2025-01-01T10:00:00Z", "suplier": { "id": 1, "code": "S1", "name": "Supplier 1", "vat-number": "123456789", "phone-number": "123456789", "email": "email@email.com", "expiration-date": "2027-01-01", "contacts": [{ "name": "Contact 1", "phone-number": "123456789", "email": "email@email.com", "default": true }], "addresses": [{ "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true },{ "code": "A2", "name": "Address 2", "address": "Address 2", "city": "City 2", "post-code": "123456", "state": "State 2", "country": "Country 2", "default": false }] }, "billing-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "observations": "Observations", "notes": "Notes", "external-notes": "External notes", "receivings": [{ "id": 1, "code": "R1", "requested-date": "2025-01-01T10:00:00Z", "due-date": "2025-01-10T10:00:00Z", "delivery-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "cost": 100.0, "shipping-cost": 0.0, "products": [{ "id": 1, "code": "P1", "name": "P1 name", "quantity": 1, "uom": { "code": "U1", "name": "U1 name" }, "cost": 100.0, "observations": "Observations", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }] }], "parameters": [{ "name": "parameterName", "value": "parameterValue" }], "approval-status": "approved", "cost": 100.0, "archived": false, "ended": false, "active": true }]
Supplier created
This type of webhook will be triggered when a Supplier is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: supplier_created
-
-
Body
[{ "code": "Supplier", "name": "Supplier", "vat-number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }]
Supplier updated
This type of webhook will be triggered when a Supplier is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: supplier_updated
-
-
Body
[{ "code": "Supplier", "name": "Supplier", "vat-number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }]
Supplier deleted
This type of webhook will be triggered when a Supplier is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: supplier_deleted
-
-
Body
[{ "id": 1 }]
Sales order created
This type of webhook will be triggered when a Production starts. When the operation performed is no time, only PRODUCTION_CREATED webhook is triggered.
-
Request (application/json)
-
Headers
x-prodsmart-topic: sales_order_created
-
-
Body
[{ "id": 1, "code": "SO1", "creation-date": "2025-01-01T10:00:00Z", "closed-date": "2025-01-10T10:00:00Z", "archived": false, "ended": false, "shipped": false, "client": { "id": 1, "code": "C1", "name": "Client 1", "vat-number": "123456789", "phone-number": "123456789", "email": "email@email.com", "contacts": [{ "name": "Contact 1", "phone-number": "123456789", "email": "email@email.com", "default": true }], "addresses": [{ "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true },{ "code": "A2", "name": "Address 2", "address": "Address 2", "city": "City 2", "post-code": "123456", "state": "State 2", "country": "Country 2", "default": false }] }, "billing-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "observations": "Observations", "notes": "Notes", "shippings": [{ "id": 1, "code": "S1", "requested-date": "2025-01-01T10:00:00Z", "due-date": "2025-01-10T10:00:00Z", "delivery-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "price": 100.0, "shipping-price": 0.0, "products": [{ "id": 1, "code": "P1", "name": "P1 name", "quantity": 1, "uom": { "code": "U1", "name": "U1 name" }, "price": 100.0, "discount": 0.0, "observations": "Observations", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }], "location": "Location 1" }], "tracking-number": "trackingNumber", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }]
Sales order updated
This type of webhook will be triggered when a Production is check-out (partial or total), except no time operations.
-
Request (application/json)
-
Headers
x-prodsmart-topic: sales_order_updated
-
-
Body
[{ "id": 1, "code": "SO1", "creation-date": "2025-01-01T10:00:00Z", "closed-date": "2025-01-10T10:00:00Z", "archived": false, "ended": false, "shipped": false, "client": { "id": 1, "code": "C1", "name": "Client 1", "vat-number": "123456789", "phone-number": "123456789", "email": "email@email.com", "contacts": [{ "name": "Contact 1", "phone-number": "123456789", "email": "email@email.com", "default": true }], "addresses": [{ "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true },{ "code": "A2", "name": "Address 2", "address": "Address 2", "city": "City 2", "post-code": "123456", "state": "State 2", "country": "Country 2", "default": false }] }, "billing-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "observations": "Observations", "notes": "Notes", "shippings": [{ "id": 1, "code": "S1", "requested-date": "2025-01-01T10:00:00Z", "due-date": "2025-01-10T10:00:00Z", "delivery-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "price": 100.0, "shipping-price": 0.0, "products": [{ "id": 1, "code": "P1", "name": "P1 name", "quantity": 1, "uom": { "code": "U1", "name": "U1 name" }, "price": 100.0, "discount": 0.0, "observations": "Observations", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }], "location": "Location 1" }], "tracking-number": "trackingNumber", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }]
Sales order deleted
This type of webhook will be triggered when a Production record is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: sales_order_deleted
-
Body
[{ "id": 1 }]
-
Sales order closed
This type of webhook will be triggered when a Production is check-out (partial or total), except no time operations.
-
Request (application/json)
-
Headers
x-prodsmart-topic: sales_order_closed
-
-
Body
[{ "id": 1, "code": "SO1", "creation-date": "2025-01-01T10:00:00Z", "closed-date": "2025-01-10T10:00:00Z", "archived": false, "ended": false, "shipped": false, "client": { "id": 1, "code": "C1", "name": "Client 1", "vat-number": "123456789", "phone-number": "123456789", "email": "email@email.com", "contacts": [{ "name": "Contact 1", "phone-number": "123456789", "email": "email@email.com", "default": true }], "addresses": [{ "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true },{ "code": "A2", "name": "Address 2", "address": "Address 2", "city": "City 2", "post-code": "123456", "state": "State 2", "country": "Country 2", "default": false }] }, "billing-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "observations": "Observations", "notes": "Notes", "shippings": [{ "id": 1, "code": "S1", "requested-date": "2025-01-01T10:00:00Z", "due-date": "2025-01-10T10:00:00Z", "delivery-address": { "code": "A1", "name": "Address 1", "address": "Address 1", "city": "City 1", "post-code": "123456", "state": "State 1", "country": "Country 1", "default": true }, "price": 100.0, "shipping-price": 0.0, "products": [{ "id": 1, "code": "P1", "name": "P1 name", "quantity": 1, "uom": { "code": "U1", "name": "U1 name" }, "price": 100.0, "discount": 0.0, "observations": "Observations", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }], "location": "Location 1" }], "tracking-number": "trackingNumber", "parameters": [{ "name": "parameterName", "value": "parameterValue" }] }]
Client created
This type of webhook will be triggered when a Client is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: client_created
-
-
Body
[{ "code": "Supplier", "name": "Client", "vat-number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "client@client.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "client2@client2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }]
Client updated
This type of webhook will be triggered when a Client is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: client_updated
-
-
Body
[{ "code": "Client", "name": "Client", "vat-number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "client@client.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "client2@client2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }]
Client deleted
This type of webhook will be triggered when a Client is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: client_deleted
-
-
Body
[{ "id": 1 }]
Production created
This type of webhook will be triggered when a Production starts. When the operation performed is no time, only PRODUCTION_CREATED webhook is triggered.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_created
-
Body
{ "production-order": { "code": "Table_2", "id": 987 }, "operation": { "code": "Paint" }, "product": { "id": 123, "code": "Table" }, "worker": { "id": 20804, "number": 0, "name": "Zero" }, "machine": {}, "quantity": 7, "finished": true, "lot": {}, "cost": 0, "produced-waste": [], "parameters": [], "consumptions": [ { "product": { "id": 333, "code": "RawMaterial" }, "lot": {}, "date": "2023-12-21T11:39:43.000Z", "quantity": 7, "cost": 0, "id": 222 } ], "total-time-factor": 1, "rework": false, "start-time": "2023-12-21T11:39:43.000Z", "end-time": "2023-12-21T11:39:43.000Z", "is-serializable": false, "id": 111 }
-
Production updated
This type of webhook will be triggered when a Production is check-out (partial or total), except no time operations.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_updated
-
Body
{ "production-order": { "code": "Table_2", "id": 987 }, "operation": { "code": "Paint" }, "product": { "id": 123, "code": "Table" }, "worker": { "id": 20804, "number": 0, "name": "Zero" }, "machine": {}, "quantity": 10, "finished": true, "lot": {}, "cost": 0, "produced-waste": [], "parameters": [], "consumptions": [ { "product": { "id": 333, "code": "RawMaterial" }, "lot": {}, "date": "2023-12-21T11:39:43.000Z", "quantity": 7, "cost": 0, "id": 222 } ], "total-time-factor": 1, "rework": false, "start-time": "2023-11-21T11:39:43.000Z", "end-time": "2023-12-21T11:39:43.000Z", "is-serializable": false, "id": 111 }
-
Production deleted
This type of webhook will be triggered when a Production record is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: production_deleted
-
Body
{ "id": 333 }
-
Product created
This type of webhook will be triggered when a new product is created or cloned.
-
Request (application/json)
-
Headers
x-prodsmart-topic: product_created
-
Body
{ "code": "My New Product", "name": "My New Product", "observations": "", "section": null, "unit-cost": null, "unit-price": null, "families": [ { "code": "Components", "name": "Components" } ], "operations": [], "components": [], "custom-fields": [], "notification": "product_created", "shipping-package-types": [], "external-stock": null, "stock-max": null, "min-quantity-reorder": null, "quantity-multiple": null, "scrap-allowance": null, "shelf-life": null, "parameters": [], "serializable": false }
-
Product updated
This type of webhook will be triggered when a product is changed or one of its operations.
-
Request (application/json)
-
Headers
x-prodsmart-topic: product_updated
-
Body
{ "code": "My New Product Upd", "name": "My New Product Upd", "observations": "", "section": null, "unit-cost": null, "unit-price": null, "families": [ { "code": "Components", "name": "Components" } ], "operations": [], "components": [], "custom-fields": [], "notification": "product_updated", "shipping-package-types": [], "external-stock": null, "stock-max": null, "min-quantity-reorder": null, "quantity-multiple": null, "scrap-allowance": null, "shelf-life": null, "parameters": [], "serializable": false }
-
Product deleted
This type of webhook will be triggered when a product is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: product_deleted
-
Body
{ "id": 1234, "code": "My New Product" }
-
Inventory updated
This type of webhook will be triggered when an inventory movement is changed.
-
Request (application/json)
-
Headers
x-prodsmart-topic: stock_updated
-
Body
{ "product-code": "Table", "stock": 17, "lot": [ { "code": "Table-001", "stock": 1 } ] }
-
Punch clock created
This type of webhook will be triggered when a punch clock is created through tablet or backoffice.
-
Request (application/json)
-
Headers
x-prodsmart-topic: punch_clock_created
-
Body
{ "id": 1, "date": "2023-12-21T10:16:38.159Z", "notification": "punch_clock_created", "worker": { "number": 0 }, "entry": 1 }
entry
possible values:- 1 - In
- 0 - Out
-
Punch clock updated
This type of webhook will be triggered when a punch clock is changed.
-
Request (application/json)
-
Headers
x-prodsmart-topic: punch_clock_updated
-
Body
{ "id": 1, "date": "2023-12-21T10:16:32.000Z", "notification": "punch_clock_updated", "worker": { "number": 0 }, "entry": 1 }
entry
possible values:- 1 - In
- 0 - Out
-
Punch clock deleted
This type of webhook will be triggered when a punch clock is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: punch_clock_deleted
-
Body
{ "id": 1 }
-
Downtime created
This type of webhook will be triggered when a downtime is created through tablet or backoffice.
-
Request (application/json)
-
Headers
x-prodsmart-topic: downtime_created
-
Body
{ "id": 1, "start-time": "2020-01-01T00:00:00.000Z", "end-time": "2021-12-31T23:59:59.999Z", "started-by": {}, "closed-by": { "number": 0 }, "workers": [ { "number": 0 } ], "machines": [], "product": "", "production-order": "", "checked-out": true, "downtime-type": "downtime1 type", "time-spent": "08:00:00", "event-type": "downtime_created" }
-
Downtime updated
This type of webhook will be triggered when a downtime is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: downtime_updated
-
Body
{ "id": 1, "start-time": "2020-01-01T00:00:00.000Z", "end-time": "2021-12-31T23:59:59.999Z", "started-by": {}, "closed-by": { "number": 0 }, "workers": [ { "number": 0 } ], "machines": [], "product": "", "production-order": "", "checked-out": true, "downtime-type": "downtime1 type", "time-spent": "08:00:00", "event-type": "downtime_updated" }
-
Downtime deleted
This type of webhook will be triggered when a downtime is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: downtime_deleted
-
Body
{ "id": 1 }
-
Shipping inv. mov. created
This type of webhook will be triggered when a shipping inventory movement is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: shipping_inventory_movement_created
-
Body
[{ "product": { "id": 213, "code": "V23076", "uom": null }, "quantity": 300, "stock-type": "out", "date": "2015-10-02T18:52:29.000Z", "shipping": { "code": "13-5" }, "comment": "", "lot": {}, "worker": {}, "warehouse-location": {}, "id": 7 }]
-
Shipping inv. mov. updated
This type of webhook will be triggered when a shipping inventory movement is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: shipping_inventory_movement_updated
-
Body
[{ "product": { "id": 213, "code": "V23076", "uom": null }, "quantity": 300, "stock-type": "out", "date": "2015-10-02T18:52:29.000Z", "shipping": { "code": "13-5" }, "comment": "", "lot": {}, "worker": {}, "warehouse-location": {}, "id": 7 }]
-
Shipping inv. mov. deleted
This type of webhook will be triggered when a shipping inventory movement is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: shipping_inventory_movement_deleted
-
Body
[{ "id": 7 }]
-
Receiving inv. mov. created
This type of webhook will be triggered when a receiving inventory movement is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: receiving_inventory_movement_created
-
Body
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "stock-type": "in", "comment": "comment", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "purchase-order": { "id": 555, "code": "purchase-order-code", "supplier": "supplier-code", "parameters": [{ "name": "parameterX", "value": "valueX" }] }, "receiving": { "id": 666, "code": "receiving-code" }, "worker": { "id": 333, "number": 0, "name": "worker-name" } }]
-
Receiving inv. mov. updated
This type of webhook will be triggered when a receiving inventory movement is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: receiving_inventory_movement_updated
-
Body
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 11.0, "stock-type": "in", "comment": "updated", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "purchase-order": { "id": 555, "code": "purchase-order-code", "supplier": "supplier-code", "parameters": [{ "name": "parameterX", "value": "valueX" }] }, "receiving": { "id": 666, "code": "receiving-code" }, "worker": { "id": 333, "number": 0, "name": "worker-name" } }]
-
Receiving inv. mov. deleted
This type of webhook will be triggered when a receiving inventory movement is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: receiving_inventory_movement_deleted
-
Body
[{ "id": 7 }]
-
Material staging created
This type of webhook will be triggered when a movement of a material to staging is created. This webhook should be triggered together with two internal_inventory_movement_created webhooks (OUT and IN) that represent the movement from a warehouse location to production.
-
Request (application/json)
-
Headers
x-prodsmart-topic: material_staging_created
-
Body
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "production-order": { "id": 333, "code": "production-order-code" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "worker": { "id": 333, "number": 0, "name": "worker-name" } }]
-
Material staging updated
This type of webhook will be triggered when a movement of a material to staging is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: material_staging_updated
-
Body
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "production-order": { "id": 333, "code": "production-order-code" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "worker": { "id": 333, "number": 0, "name": "worker-name" } }]
-
Material staging deleted
This type of webhook will be triggered when a movement of a material to staging is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: material_staging_deleted
-
Body
[{ "id": 111 }]
-
Internal inv. mov. created
This type of webhook will be triggered when an internal movement is created.
-
Request (application/json)
-
Headers
x-prodsmart-topic: internal_inventory_movement_created
-
Body
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "stock-type": "in", "comment": "comment", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "worker": { "id": 333, "number": 0, "name": "worker-name" } }]
stock-type
possible values:- in
- out
- transit
-
Internal inv. mov. updated
This type of webhook will be triggered when an internal movement is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: internal_inventory_movement_updated
-
Body
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "stock-type": "out", "comment": "comment", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "worker": { "id": 333, "number": 0, "name": "worker-name" } }]
stock-type
possible values:- in
- out
- transit
-
Internal inv. mov. deleted
This type of webhook will be triggered when an internal movement is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: internal_inventory_movement_deleted
-
Body
[{ "id": 7 }]
-
Lot created
This type of webhook will be triggered when a product lot is created. If a lot is created in a production record both webhooks are triggered (production_created and lot_created).
-
Request (application/json)
-
Headers
x-prodsmart-topic: lot_created
-
Body
{ "code": "123Lot", "product": { "id": 222, "code": "Table", "uom": "Box50" }, "expiration-date": "2024-12-21T10:30:55.000Z", "creation-date": "2023-12-21T10:30:55.000Z", "supplier-lot": "supplier lot name", "id": 1111 }
-
Lot update
This type of webhook will be triggered when a product lot is updated.
-
Request (application/json)
-
Headers
x-prodsmart-topic: lot_updated
-
Body
{ "code": "1234Lot", "product": { "id": 222, "code": "Table", "uom": "Box50" }, "expiration-date": "2024-12-21T10:30:55.000Z", "creation-date": "2023-12-21T10:30:55.000Z", "supplier-lot": "supplier lot name", "id": 1111 }
-
Lot deleted
This type of webhook will be triggered when a product lot is deleted.
-
Request (application/json)
-
Headers
x-prodsmart-topic: lot_deleted
-
Body
{ "code": "1234Lot", "product": { "code": "Table" } }
-
Changes Feed Channels ¶
If by any reason you’re not able to use webhooks, we currently offer an alternative as a changes stack that will store changes ocurred in the last 24h, or since you last requested the changes via the webservice we provide for it. To use this feature, you have to create a channel in the integrations menu (https://fusionoperations.autodesk.com/admin/integrations). You can create up to 3 channels per organization.
There are 6 types of Changes Channels:
-
DOWN_TIME
-
PRODUCT
-
PRODUCTION
-
PRODUCTION_ORDER
-
PUNCH_CLOCK
-
STOCK
Changes Feed Channel ¶
Get changesGET/api/v1/changes/{channel}{?access_token}
When calling this service, you’ll get a list of entities that have changed either because they were created/updated/deleted or because their state has changed. You’ll receive an array with the current state of the entities (ordered from the oldest changes to the newest), with a maximum of 25 per service call. The entities you get from the service are removed from the stack (until they have new updates). The service will return an empty array ("[]") if there are no changes.
Example URI
- channel
string
(required)the channel to access
- access_token
string
(required)Fusion Operations API access token.
- workers
boolean
(optional)show worker list on Production Orders channel response
Headers
Content-Type: application/json
Downtimes ¶
[
{
"id": 1435048,
"start-time": "2022-04-22T14:47:00.000+01:00",
"end-time": "2022-04-23T00:00:00.000+01:00",
"started-by": {},
"closed-by": {
"number": 1
},
"workers": [
{
"number": 1
}
],
"machines": [],
"product": "",
"production-order": "",
"checked-out": true,
"downtime-type": "Maintenance",
"time-spent": "09:13:00",
"event-type": "downtime_deleted"
}
]
Note: The event-type
field will only be present when a Downtime is deleted.
Production Orders ¶
[
{
"products": [
{
"product": "RN2",
"quantity-ordered": 30.0,
"observations": "",
"quantity-produced": 0.0
}
],
"code": "Production Order 123",
"description": "",
"shipping": {},
"start-date": "2022-04-21T00:00:00.000+01:00",
"due-date": "2022-04-28T00:00:00.000+01:00",
"ended": false,
"machines": [],
"notes": "",
"is-active": true,
"running-status": "notstarted",
"status": "onschedule",
"material-staging-complete": false,
"id": 1379919
}
]
Note: The running-status
field will have the deleted
value when a Production Order is deleted.
Products ¶
[
{
"code": "V23076",
"name": "V23076",
"observations": "",
"section": null,
"unit-cost": null,
"unit-price": null,
"families": [],
"operations": [],
"components": [],
"custom-fields": [],
"notification": null,
"serializable": null,
"shipping-package-types": [],
"external-stock": null,
"stock-max": null,
"min-quantity-reorder": null,
"quantity-multiple": null,
"scrap-allowance": null,
"shelf-life": null,
"parameters": []
}
]
Note: The notification
field will have the value product_deleted
a Product is deleted.
Production Records ¶
[
{
"production-order": {
"code": "P1 - Week 14",
"id": 3641
},
"operation": {
"code": "CUT3",
"product": "P1"
},
"worker": {
"number": 6
},
"machine": {
"code": "WJC"
},
"quantity": 0.0,
"checked-out": false,
"produced-waste": [],
"consumptions": [],
"total-time-factor": 1.0,
"rework": false,
"work-time": "00H00m00s",
"start-time": "2022-04-22T14:43:00.000+01:00",
"end-time": "2022-04-22T14:43:00.000+01:00",
"status": "deleted",
"show-check-in-checklist-and-c-f": false,
"id": 12952533
}
]
Note: The status
field will only be present when a Production Record is deleted.
Punch Clocks ¶
[
{
"id": 932015,
"date": "2022-05-19T14:35:30.000+01:00",
"notification": "punch_clock_deleted",
"worker": {
"number": 0
},
"entry": 1
}
]
Note: The notification
field will only be present when a Punch Clock entry is deleted.
Inventory ¶
[
{
"product-code": "P1",
"stock": 2395.0,
"lot": [
{
"code": "Lot 0086",
"stock": 500.0
}
]
}
]