OpenBOM API Specification Document

Overview

APIs

1. Login

2. Renew access token

3. List BOMs

4. List Top Level BOMs

5. List Order BOMs

6. List Catalogs

7. List Property tables

8. List BOM Revisions

9. List Item Revisions

10. Get specific bom document

11. Get a specific bom document in a flattened view.

12. Get specific order bom document

13. Get specific catalog document

14. Get specific property table document

15. Get specific revision for bom document

16. Get specific revision of bom document in flattened view

17. Get merged revisions for for specific item

18. Update bom document property value

19. Update catalog document property value

20. Find BOM documents by parameters

21. List Templates

22. Create bom document

23. Create catalog document

24. Add new row or update existing row in the bom or catalog document

25. Get image file

26. Upload image file for boms

27. Upload image file for catalog

28. Delete specific bom document

29. Delete specific catalog document

30. Remove part from bom document

31. Remove part from catalog document

32. List Event Subscriptions

33. Subscribe to event or update subscription

34. Upload files to OpenBOM storage

35. Download files from OpenBOM storage

36. Export specific bom document

37. Create a revision for an Inventory Item

38. Get specific item for catalog document by part number

Structures

1. BOM item in boms listing array

2. BOM document

3. Catalog item in catalogs listing array

4. Catalog document

5. Property table item in property tables listing array

6. Property table document

Glossary

Conventions

Status Codes

Overview

The OpenBOM API allows developers to programmatically access data stored in the OpenBOM user account.

  1. Each developer will need to get an application key from OpenBOM and use it with each and every request to OpenBOM’s API. An API Key is required to be sent as part of every request to the OpenBOM API, in the form of an X-OpenBOM-AppKey request header. Developers must send requests to get application key to support@openbom.com

  1. In addition, access token or app secret must be provided in every request, except for the  /login API. (See below: Login)

  1. The OpenBOM API will only respond to secured communication done over HTTPS. HTTP requests will be sent a 301 redirect to corresponding HTTPS resources.

  1. The response to every request is sent in JSON format, with the content-type header set appropriately. In case the API request results in an error, it is represented by an "error": {} key in the JSON response.

  1. The request method (verb) determines the nature of action you intend to perform. A request made using the GET method implies that you want to fetch something from OpenBOM, and POST implies you want to save something new to OpenBOM.

  1. The API calls will respond with appropriate HTTP status codes for all requests.

  1. To prevent abuse, OpenBOM imposes rate limits on all incoming requests, one request per second is the top limit (Subject to changes in the future). 429 response status code will be returned when the limit is reached.

Authentication

OpenBOM supports two options for authentication:

  1. An access token can be obtained by calling /login API and supplying openBOM user credentials (username and password). Intended for integration with a custom client that interacts with openBOM APIs directly (like mobile app calling OpenBOM APIs). The access token received in response from /login API should be sent in every subsequent API call in the x-openbom-accesstoken request header.

  1. By providing an app secret, along with app key, with every API call, each request is authenticated using the combination of these two values. App secret can be obtained with the app key. Intended for custom backend systems integration with OpenBOM APIs. App secret should be sent in the x-openbom-appsecret request header. The set of app key and secret is tied to a specific OpenBOM user or to OpenBOM api applications.

APIs

1. Login

Authenticate the user with the system and obtain the access token. Access token, received in response, will be used in all subsequent requests as a required parameter. Username parameter value must match the developer's email address defined for the application key.

Request

Method

URL            

POST

/login

Type

Params

Values

HEAD

HEAD

HEAD

POST

content-type

X-OpenBOM-AppKey

X-OpenBOM-AppSecret (only for option 2 authentication)

JSON Object:{

username:...

password:...

}

string - application/json

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that the developer received from OpenBOM upon email request and must be sent with all client requests. The application key helps the server to validate the request source.

Example:

curl -X POST \

  https://developer-api.openbom.com/login \

  -H 'content-type: application/json' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{"username":"user@email.tld","password":"hardtoguess"}'

Response

Status

Response

200

{

    "access_token": <access_token>,

    "refresh_token": <auth_key>,

    "token_type": ”Bearer”,

    "expires_in": 86400

}

access_token (string) - all further API calls must have this key in request header X-OpenBOM-AccessToken

400

{"error":"Parameter [\"username\"] not found."}

401

{"error":"Unable to authenticate user[user@email]"}

403

{"error":""Missing or invalid developer application key[app_key]""}

2. Renew access token

Authenticate the user with the system and obtain the access token using refresh token.

Request

Method

URL            

POST

/token/renew

Type

Params

Values

HEAD

HEAD

POST

content-type

X-OpenBOM-AppKey

JSON Object:{

refresh_token:...}

string - application/json

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that the developer received from OpenBOM upon email request and must be sent with all client requests. The application key helps the server to validate the request source.

Example:

curl -X POST \

  https://developer-api.openbom.com/token/renew \

  -H 'content-type: application/json' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{"refresh_token":"..."}'

Response

Status

Response

200

{

    "access_token": <access_token>,

    "refresh_token": <auth_key>,

    "token_type": ”Bearer”,

    "expires_in": 86400

}

access_token (string) - all further API calls must have this key in request header X-OpenBOM-AccessToken

400

{"error":"Parameter [\"username\"] not found."}

401

{"error":"Error renewing access token ..."}

403

{"error":""Missing or invalid developer application key[app_key]""}

3. List BOMs

Get all boms accessible by the user

Request

Method

URL            

GET

/boms

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/boms \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/boms \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of bom documents properties (array) . Each item in the boms listing array has the following structure.

{

        "nodeId": 0,

        "bomId": "0",

        "id": "0",

        "name": "",

        "nameuri": "",

        "user": "",

        "status": "",

        "permissionString": "",

        "permission": 0,

        "modifiedBy": "",

        "modified": 0,

        "bomPartNumber": "",

        "productionBatch": false,

        "released": false

}

An example response is:-

[

    {

        "nodeId": 29290,

        "bomId": "49c6f1f3-7006-48fc-86f1-f3700628fcff",

        "id": "49c6f1f3-7006-48fc-86f1-f3700628fcff",

        "name": "R2D2_2",

        "nameuri": null,

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518126594320,

        "bomPartNumber": "R2D2_2",

        "productionBatch": false,

        "released": false

    },

    {

        "nodeId": 34669,

        "bomId": "bec849c7-f55b-4dc8-8849-c7f55bddc846",

        "id": "bec849c7-f55b-4dc8-8849-c7f55bddc846",

        "name": "Controller BOM",

        "nameuri": null,

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518124259396,

        "bomPartNumber": "Controller BOM",

        "productionBatch": false,

        "released": true

    }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

4. List Top Level BOMs

Get all only top level boms accessible by the user

Request

Method

URL            

GET

/toplevelboms

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/toplevelboms \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/toplevelboms \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of top level bom documents properties (array) . Each item in the boms listing array has the following structure.

{

        "nodeId": 0,

        "bomId": "0",

        "id": "0",

        "name": "",

        "nameuri": "",

        "user": "",

        "status": "",

        "permissionString": "",

        "permission": 0,

        "modifiedBy": "",

        "modified": 0,

        "bomPartNumber": "",

        "productionBatch": false,

        "released": false

}

An example response is:-

[

    {

        "nodeId": 29290,

        "bomId": "49c6f1f3-7006-48fc-86f1-f3700628fcff",

        "id": "49c6f1f3-7006-48fc-86f1-f3700628fcff",

        "name": "R2D2_2",

        "nameuri": null,

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518126594320,

        "bomPartNumber": "R2D2_2",

        "productionBatch": false,

        "released": false

    },

    {

        "nodeId": 34669,

        "bomId": "bec849c7-f55b-4dc8-8849-c7f55bddc846",

        "id": "bec849c7-f55b-4dc8-8849-c7f55bddc846",

        "name": "Controller BOM",

        "nameuri": null,

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518124259396,

        "bomPartNumber": "Controller BOM",

        "productionBatch": false,

        "released": true

    }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

5. List Order BOMs

Get all order boms accessible by the user

Request

Method

URL            

GET

/orderboms

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AccessToken

X-OpenBOM-AccessTokenAppKey value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/orderboms \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/orderboms \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of order bom

documents properties (array) . Each item in the order boms listing array has the following structure.

{

        "nodeId": 0,

        "bomId": "0",

        "id": "0",

        "name": "",

        "numUnits": 0,

        "nameuri": "",

        "user": "",

        "status": "",

        "permissionString": "",

        "permission": 0,

        "modifiedBy": "",

        "modified": 0,

        "bomPartNumber": "",

        "productionBatch": false,

        "released": false

}

An example response is:-

[

    {

        "nodeId": 7620,

        "bomId": "4c1d540b-7117-4c87-9d54-0b71177c8706",

        "id": "4c1d540b-7117-4c87-9d54-0b71177c8706",

        "name": "Order 1 Controller BOM",

                "numUnits": 3,

        "nameuri": null,

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518124271145,

        "productionBatch": true,

        "released": false

    },

    {

        "nodeId": 7619,

        "bomId": "d767cc53-e4a2-4351-a7cc-53e4a2d35122",

        "id": "d767cc53-e4a2-4351-a7cc-53e4a2d35122",

        "name": "Order 1 calc failure",

                "numUnits": 1,

        "nameuri": null,

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518124230864,

        "productionBatch": true,

        "released": false

    }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

6. List Catalogs

Get all catalogs accessible by the user

Request

Method

URL            

GET

/catalogs

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/catalogs \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/catalogs \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of catalog documents properties (array) . Each item in the catalogs listing array has the following structure.

{

    "nodeId": 0,

    "itemsId": "0",

    "id": "0",

    "name": "",

    "user": "",

    "status": "",

    "permissionString": "",

    "permission": 0,

    "modifiedBy": "",

    "modified": 0

}

An example response is:-

[

    {

        "nodeId": 43557,

        "itemsId": "338c9e50-fe66-4a17-8c9e-50fe66ea17b5",

        "id": "338c9e50-fe66-4a17-8c9e-50fe66ea17b5",

        "name": "Items",

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518127000879

    },

    {

        "nodeId": 7048,

        "itemsId": "4b54c2b4-49aa-4a71-94c2-b449aa6a7158",

        "id": "4b54c2b4-49aa-4a71-94c2-b449aa6a7158",

        "name": "t4",

        "user": "user@email",

        "status": "active",

        "permissionString": "w",

        "permission": 7,

        "modifiedBy": "user@email",

        "modified": 1518107206291

    }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

7. List Property tables

Get all property tables accessible by the user

Request

Method

URL            

GET

/propertytables

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/propertytables \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/propertytables \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of property tables documents properties (array) . Each item in the property tables listing array has the following structure.

{

    "_id": "",

    "id": "",

    "uri": "",

    "name": "",

    "createdBy": "",

    "updatedBy": "",

    "created": "",

    "updated": "",

    "private": false

}

An example response is:-

[

    {

        "_id": "64c4ff25-eed6-4c8f-84ff-25eed6bc8fd2",

        "id": "64c4ff25-eed6-4c8f-84ff-25eed6bc8fd2",

        "uri": "urn:openbom:name:user%email:props%20table",

        "name": "props table",

        "createdBy": "user@email",

        "updatedBy": null,

        "created": "2017-02-16T04:33:55.787Z",

        "updated": "2017-02-16T04:33:55.788Z",

        "private": false

    },

    {

        "_id": "53064d1a-8330-4a9a-864d-1a8330aa9a0e",

        "id": "53064d1a-8330-4a9a-864d-1a8330aa9a0e",

        "uri": "urn:openbom:name:user%40email:test1",

        "name": "test1",

        "createdBy": "user@email",

        "updatedBy": null,

        "created": "2017-08-25T13:31:28.387Z",

        "updated": "2017-08-25T13:31:28.388Z",

        "private": false

    }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

8. List BOM Revisions

Get all revisions for specific bom document

Request

Method

URL            

GET

/bom/<bomId>/revisions

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of bom document revisions. Each item in the bom revisions listing array has the following structure.

{

    "id": "8036d4e6-e6f5-4923-b6d4-e6e6f5692304",

    "revisionNumber": 7,

    "docId": "ce7d0850-8576-443f-bd08-508576343f7c",

    "description": "xtest"

}

where :

"id" - is revision document id

"revisionNumber" - is the auto assigned revision number

"docId" - is the id of the bom document this revision was created of.

"description" - is user provided value when revision was created.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

9. List Item Revisions

Get all revisions for specific item

Request

Recommended:

Method

URL            

GET

/catalog/<catalogId>/revisions/partnumber?partNumber=<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

partNumber

string

string

string

string

Deprecated:

Method

URL            

GET

/catalog/<catalogId>/revisions/partnumber/<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

<partNumber>

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The id of the catalog document that contains the specified item. Can be taken from the listing response. 

<partNumber>

The item’s part number.

Example

Recommended:

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/partnumber?partNumber=partnumber1 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/partnumber?partNumber=partnumber1 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Deprecated:

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/partnumber/partnumber1 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/partnumber/partnumber1 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of items revisions. Each element in the items revisions listing array has the following structure.

{

    "id": "94d853f0-e9bc-4fa6-9853-f0e9bc3fa6b2",

    "partNumber": "part1",

    "revisionNumber": 2,

    "revision": "2",

    "docId": "60221791-20d5-4db3-a217-9120d5bdb345",

    "state": "Released",

    "bomRevision": {

      "nodeId": 542743,

      "bomId": "3758b8c4-2ed4-4daf-98b8-c42ed46daf86",

      "name": "part1",

      "nameuri": null,

      "user": "user@email",

      "modifiedBy": "user@email",

      "modified": 1637298638181,

      "modifiedString": "2021-11-19T05:10:38.181Z",

      "bomPartNumber": "part1",

      "productionBatch": false,

      "numUnits": null,

      "released": false,

      "revisionNumber": 2,

      "revision": "2"

    }

  }

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

10. Get specific bom document

Receive the json representation of the bom document stored in openbom.

Request

Method

URL            

GET

/bom/<bomId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

Optional:

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

useview

string

string

string

boolean

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document to retrieve. Can be taken from the listing response. 

Optional query parameter:

useview - The default value is “true”. It means that every bom document will be returned according to the view that was associated with it using openbom UI. There are two options to get bom document without view filtering, user can either login to openbom UI, open specific bom document and remove the view assigned to this bom document, or call the get bom API with “useview=false” query parameter: /bom/<bomId>?useview=false

Example

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing a bom document.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

11. Get a specific bom document in a flattened view.

Receive the json representation of the flattened bom document stored in openbom.

Request

Method

URL            

GET

/flattenedbom/<bomId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document to retrieve in flattened view. Can be taken from the listing response. 

Example

  1. curl -X GET \

https://developer-api.openbom.com/flattenedbom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/flattenedbom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing a bom document in a flattened view.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

12. Get specific order bom document

Receive the json representation of the order bom document stored in openbom.

Request

Method

URL            

GET

/orderbom/<orderBomId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<orderBomId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<orderBomId>

The id of the bom document to retrieve. Can be taken from the order boms listing response. 

Example

  1. curl -X GET \

https://developer-api.openbom.com/orderbom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/orderbom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing an order bom document.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

13. Get specific catalog document

Receive the json representation of the catalog document stored in openbom.

Request

Method

URL            

GET

/catalog/<catalogId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The id of the catalog document to retrieve. Can be taken from the listing response. 

Example

  1. curl -X GET \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5\

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing a catalog document.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

14. Get specific property table document

Receive the json representation of the property table document stored in OpenBOM.

Request

Method

URL            

GET

/propertytable/<propertyTableId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<propertyTableId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<propertyTableId>

The id of the property table document to retrieve. Can be taken from the listing response. 

Example

  1. curl -X GET \

https://developer-api.openbom.com/propertytable/64c4ff25-eed6-4c8f-84ff-25eed6bc8fd2\

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/propertytable/64c4ff25-eed6-4c8f-84ff-25eed6bc8fd2\

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json array of objects representing items inside property table document.

Refer to the Structures section.

Example response is:

[

    {

        "_id": "08f5562f-76af-42eb-b556-2f76aff2eb28",

        "id": "08f5562f-76af-42eb-b556-2f76aff2eb28",

        "uri": "urn:openbom:name:user%40email:prop1",

        "name": "prop1",

        "sourcePropertyId": null,

        "privateTableId": "64c4ff25-eed6-4c8f-84ff-25eed6bc8fd2",

        "publicProperty": false,

        "status": "A",

        "datatype": "N",

        "source": "U",

        "created_by": "user@email",

        "created": "2017-02-16T04:34:08.135Z",

        "updated": "2017-02-16T04:34:08.138Z"

    },

    {

        "_id": "763e1cd6-2e2e-46ac-be1c-d62e2e46acec",

        "id": "763e1cd6-2e2e-46ac-be1c-d62e2e46acec",

        "uri": "urn:openbom:name:user%40email:prop2",

        "name": "prop2",

        "sourcePropertyId": null,

        "privateTableId": "64c4ff25-eed6-4c8f-84ff-25eed6bc8fd2",

        "publicProperty": false,

        "status": "A",

        "datatype": "N",

        "source": "U",

        "created_by": "user@email",

        "created": "2017-02-16T04:34:15.937Z",

        "updated": "2017-02-16T04:34:15.939Z"

    }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

15. Get specific revision for bom document

Receive the json representation of the revision document stored in openbom.

Request

Method

URL            

GET

/bom/<bomId>/revision/<revisionNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

<revisionNumber>

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document that revision was created for. Can be taken from the listing response. 

<revisionNumber>

The revision number. It is auto generated and visible in the revisions listing response.

Example

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/revision/2 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/revision/2 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing a bom revision document.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

16. Get specific revision of bom document in flattened view

Receive the json representation of the revision of bom document in flattened view

Request

Method

URL            

GET

/flattenedbom/<bomId>?revisionNumber=<revisionNum>

Type

Params

Values

HEAD

HEAD

URL_PARAM

PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

revisionNumber

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document that revision was created for. Can be taken from the listing response. 

<revisionNumber>

The revision number. It is auto generated and visible in the revisions listing response.

Example

  1. curl -X GET \

https://developer-api.openbom.com/flattenedbom/49c6f1f3-7006-48fc-86f1-f3700628fcff?revisionNumber=2 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/flattenedbom/49c6f1f3-7006-48fc-86f1-f3700628fcff?revisionNumber=2 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing a bom revision document in flattened view.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

17. Get merged revisions for specific item

Receive the json representation of the merged revisions document for specific item.

Refer to OpenBOM support website for item revision concept.

Request

Recommended:

Method

URL            

GET

/catalog/<catalogId>/revisions/merged/partnumber?partNumber=<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

partNumber

string

string

string

string

Deprecated:

Method

URL            

GET

/catalog/<catalogId>/revisions/merged/partnumber/<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

<partNumber>

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The id of the catalog document that contains the specified item. Can be taken from the listing response. 

<partNumber>

The item’s part number.

Example

Recommended:

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/merged/partnumber?partNumber=part1 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/merged/partnumber?partNumber=part1 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Deprecated:

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/merged/partnumber/part1 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/catalog/49c6f1f3-7006-48fc-86f1-f3700628fcff/revisions/merged/partnumber/part1 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json object representing a merged item revisions document.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

18. Update bom document property value

Updates specific property value, for specific part number in specified bom document.

Request

Method

URL            

POST

/bom/<bomId>/propertyvalue

Type

Params

Values

HEAD

HEAD

URL_PARAM

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

<json_params>

{

        "partNumberPropertyName":"",

        "partNumber":"",

        "propertyName":"",

        "propertyValue":""

}

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document to retrieve. Can be taken from the listing response.

<json_params>

  {

    "partNumberPropertyName":"Part Number",  //Name of the property for part numbers

    "partNumber":"Centre Leg Assembly",  //Actual item’s part number to identify the row in the document

    "propertyName":"Quantity", //Name of the property to be updated

    "propertyValue":"25" //New Value of the property

  }

Example

  1. curl -X POST \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/propertyvalue \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{

        "partNumberPropertyName":"Part Number",

        "partNumber":"Centre Leg Assembly",

        "propertyName":"Quantity",

        "propertyValue":"25"

}'

  1. curl -X POST \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/propertyvalue \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{

        "partNumberPropertyName":"Part Number",

        "partNumber":"Centre Leg Assembly",

        "propertyName":"Quantity",

        "propertyValue":"25"

}'

Response

Status

Response

200

{"message": "property value updated."}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

19. Update catalog document property value

Updates specific property value, for specific part number in specified catalog document.

Request

Method

URL            

POST

/catalog/<catalogId>/propertyvalue

Type

Params

Values

HEAD

HEAD

HEAD

URL_PARAM

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

Content-Type

<catalogId>

<json_params>

{

        "partNumberPropertyName":"",

        "partNumber":"",

        "propertyName":"",

        "propertyValue":""

}

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Content-Type

Content-Type  value application/json

<catalogId>

The id of the catalog document to update. Can be taken from the listing response. 

<json_params>

  {

    "partNumberPropertyName":"Part Number",  //Name of the property for part numbers

    "partNumber":"Centre Leg Assembly",  //Actual item’s part number to identify the row in the document

    "propertyName":"Quantity", //Name of the property to be updated

    "propertyValue":"25" //New Value of the property

  }

Example

  1. curl -X POST \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5/propertyvalue \

  -H 'content-type: application/json' \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{

        "partNumberPropertyName":"Part Number",

        "partNumber":"PN124",

        "propertyName":"Quantity On Hand",

        "propertyValue":"14"

}'

  1. curl -X POST \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5/propertyvalue \

  -H 'content-type: application/json' \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{

        "partNumberPropertyName":"Part Number",

        "partNumber":"PN124",

        "propertyName":"Quantity On Hand",

        "propertyValue":"14"

}'

Response

Status

Response

200

{"message": "property value updated."}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

20. Find BOM documents by parameters

Finds BOM documents by specific parameters.

Request

Method

URL            

POST

/boms/byparams

Type

Params

Values

HEAD

HEAD

HEAD

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

Content-Type

<json_params>

{

        "name":""

}

Or

{

        "bomPartNumber":""

}

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM 

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Content-Type

Content-Type  value application/json

<json_params>

Key value pairs in JSON form.

Keys can be one or all of: name, bomPartNumber

Example

  1. curl -X POST \

  https://developer-api.openbom.com/boms/byparams \

  -H 'content-type: application/json' \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{

        "name":"somebomname"

}'

  1. curl -X POST \

  https://developer-api.openbom.com/boms/byparams \

  -H 'content-type: application/json' \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey' \

  -d '{

        "name":"somebomname"

}'

Response

Status

Response

200

Partial example response, list of matching BOM documents:

[
   {
       "
id": "ef9a204a-a8fe-48ed-9a20-4aa8fef8ede3",
       "
type": "bom",
       
"partNumber": "bompartnumber",
       "
name": "somebomname",
       "
modifiedDate": "07 Aug 2018; 15:48:27 GMT",
       "
createdDate": "07 Aug 2018; 15:47:33 GMT",
       "
modifiedBy": "user@email",
       "
createdBy": "user@email",
       "
columns": [
           "Part Number",
           "Thumbnail image",
           "Description",
           "Cost",
           "Quantity"
       ],
       "
cells": [
           [
               "part1",
               null,
               "desc",
               2,
               1
           ]
       ],
       "
totalCells": [
           [
               "",
               "",
               "",
               "",
               1
           ]
       ]
   }
]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

21. List Templates

Get all templates accessible by the user

Request

Method

URL            

GET

/templates

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/templates \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/templates \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an object containing the list of template documents properties (array) . Each item in the templates listing array has the following structure.

  {

    "templateId": "",

    "id": "",

    "name": "",

    "nameuri": "",

    "user": "",

    "status": "",

    "createdBy": "",

    "created": 0,

    "createdString": "",

    "modified": 0,

    "modifiedString": ""

  }

An example response is:-

[

  {

    "templateId": "cc12e1fc-140e-4a6b-92e1-fc140efa6b0f",

    "id": "cc12e1fc-140e-4a6b-92e1-fc140efa6b0f",

    "name": "test template",

    "nameuri": null,

    "user": null,

    "status": "A",

    "createdBy": "user@email",

    "created": 1573740501855,

    "createdString": "2019-11-14T14:08:21.855Z",

    "modified": 1573740501855,

    "modifiedString": "2019-11-14T14:08:21.855Z"

  },

  {

    "templateId": "17e1858d-8656-4134-a185-8d86566134f2",

    "id": "17e1858d-8656-4134-a185-8d86566134f2",

    "name": "TemplateFormulaTemplate",

    "nameuri": null,

    "user": null,

    "status": "A",

    "createdBy": "user@email",

    "created": 1587617206269,

    "createdString": "2020-04-23T04:46:46.269Z",

    "modified": 1587617206273,

    "modifiedString": "2020-04-23T04:46:46.273Z"

  }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

22. Create bom document

Creates a bom document.

Request

Method

URL            

POST

/bom/create

Type

Params

Values

HEAD

HEAD

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<json_params>

{

        "docName":"",

[optional]        "bomPartNumber":"",

[optional]        "catalogId":"",

[optional]        "templateId":""

}

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<json_params>

{

        "docName":"new bom", //Unique Name of the new BOM document,

must be unique

[optional] "bomPartNumber":"partnumber", //Part number to be set to the bom

[optional] "catalogId":"", //Catalog that will be assigned to the bom

[optional] "templateId":"" //Templated will be used to create the bom

}

Example

  1. curl -X POST \

https://developer-api.openbom.com/bom/create \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey' \

  -H 'content-type: application/json' \

  -d '{

        "docName":"new bom",

        "bomPartNumber":"PN1",

        "catalogId":"",

        "templateId":""

}'

  1. curl -X POST \

https://developer-api.openbom.com/bom/create \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey' \

  -H 'content-type: application/json' \

  -d '{

        "docName":"new bom",

        "bomPartNumber":"PN1",

        "catalogId":"",

        "templateId":""

}'

Response

Status

Response

200

Response will be a json object representing bom document.

Refer to the Structures section.

400

{"error": "BOM exists with name, BOM names are unique."}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

23. Create catalog document

Creates a catalog document.

Request

Method

URL            

POST

/catalog/create

Type

Params

Values

HEAD

HEAD

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<json_params>

{

   "docName": "",

[optional] "autoPartNumbers" : true,

[optional] "uniquePartNumbers" : false,

[optional] "partNumberPattern" : {

       "prefix" :"",

       "separator" : "",

       "seqStart": "",

       "seqEnd": "",

       "seqStep": "",

       "suffix": ""

     }

}

 

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<json_params>

{

     "docName": "", //Unique Name of the new Catalog document must be unique

[optional] "autoPartNumbers" : true, //if true part numbers will be generated according to pattern

[optional] "uniquePartNumbers" : false, // if true will not allow duplicate part numbers

[optional] "partNumberPattern" : {

       "prefix" :"",

       "separator" : "",

       "seqStart": "",

       "seqEnd": "",

       "seqStep": "",

       "suffix": ""

     }

   }

Example

  1. curl -X POST \

https://developer-api.openbom.com/catalog/create \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey' \

  -H 'content-type: application/json' \

  -d '{

     "docName": "catalogName",

     "autoPartNumbers" : true,

     "uniquePartNumbers" : false,

     "partNumberPattern" : {

       "prefix" :"PREFIX",

       "separator" : "-",

       "seqStart": "1",

       "seqEnd": "100",

       "seqStep": "2",

       "suffix": "SUFFIX"

     }

}'

  1. curl -X POST \

https://developer-api.openbom.com/catalog/create \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey' \

  -H 'content-type: application/json' \

  -d '{

     "docName": "catalogName",

     "autoPartNumbers" : true,

     "uniquePartNumbers" : false,

     "partNumberPattern" : {

       "prefix" :"PREFIX",

       "separator" : "-",

       "seqStart": "1",

       "seqEnd": "100",

       "seqStep": "2",

       "suffix": "SUFFIX"

     }

}'

Response

Status

Response

201

Response will be a json object representing a created catalog document.

Refer to the Structures section.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

24. Add new row or update existing row in the bom or catalog document

Adds a new row to the specified bom document. Formulas will be applied to the new row if the bom document was created using template and template has formulas defined.

Request

Method

URL            

PUT

/bom/<bomId>/parts

/catalog/<catalogId>/parts

Type

Params

Values

HEAD

HEAD

URL_PARAM

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>|<catalogId>

<json_params> //Array of objects

[

  {

    "partNumber":"1",

    "properties": {

        "column1":"",

        "column2":"",

        "column3":""

    }

  },

  {

    "partNumber":"2",

    "properties": {

        "column1":"",

        "column2":"",

        "column3":""

    }

  }

]

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId> or <catalogId>

The id of the bom or catalog document to add or update row. Can be taken from the listing response.

<json_params> Array of json objects:

[

  {

    "partNumber":"1", //The partnumber property value for a new or existing row

    "properties": {   //Names and values for the properties of the new or updated row

        "Column1":"",   // Must match column names in the bom document.

        "column2":"",

        "column3":""

    }

  }

]

Example

  1. curl -X PUT \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/parts \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'' \

  -H 'content-type: application/json' \

  -d '[

          {

                "partNumber":"1",

                "properties": {  

              "column1":"",  

              "column2":"",

              "column3":""

               }

           },

          {

             "partNumber":"1",

             "properties": {  

           "column1":"",  

           "column2":"",

           "column3":""

             }

         }

]'

  1. curl -X PUT \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/parts \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'' \

  -H 'content-type: application/json' \

  -d '[

          {

                "partNumber":"1",

                "properties": {  

              "column1":"",  

              "column2":"",

              "column3":""

               }

           },

          {

             "partNumber":"1",

             "properties": {  

           "column1":"",  

           "column2":"",

           "column3":""

             }

         }

]'

Response

Status

Response

200

[{"partNumber":"OK"|"partNumber":"ERROR"}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

25. Get image file

Retrieve image file by url from openbom document. The url is provided inside the bom or catalog json response from get specific bom or catalog APIs.

Request

Method

URL            

GET

/document/<documentId>/image?filename=<filename>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<documentId>

<filename>

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

https://developer-api.openbom.com/document/ec539312-72bf-4ab1-9393-1272bf7ab120/image?filename=openbom.png \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/document/ec539312-72bf-4ab1-9393-1272bf7ab120/image?filename=openbom.png \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

302

Response a redirect to url that will actually serve the image file

The url will be provided `in the http header ’Location’

curl client supports automatic redirects with -L flag

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

26. Upload image file for boms

Update specific cell in bom document with image file.  

Request

Method

URL            

POST

/document/<documentId>/image

Type

Params

Values

HEAD

HEAD

URL_PARAM

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<documentId>

"file"

"partNumber"

"imageProperty"

string

string

string

binary

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl --location --request POST 'https://developer-api.openbom.com/document/277c6246-005d-449a-bc62-46005dd49ad0/image' \

--header 'X-Openbom-AccessToken: eyJraWQiOiJrZHJI...' \

--header 'X-Openbom-AppKey: developerappkey' \

--form 'file=@/Users/user/Downloads/image.jpg' \

--form 'partNumber=part1' \

--form 'imageProperty=Thumbnail image'

  1. curl --location --request POST 'https://developer-api.openbom.com/document/277c6246-005d-449a-bc62-46005dd49ad0/image' \

--header 'X-Openbom-appsecret: developerappappsecret' \

--header 'X-Openbom-AppKey: developerappkey' \

--form 'file=@/Users/user/Downloads/image.jpg' \

--form 'partNumber=part1' \

--form 'imageProperty=Thumbnail image'

Response

Status

Response

201

Created

400

BAD_REQUEST

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

27. Upload image file for catalog

Update specific cell in catalog document with image file.  

Request

Method

URL            

POST

/catalog/<documentId>/image

Type

Params

Values

HEAD

HEAD

URL_PARAM

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<documentId>

"file"

"partNumber"

"imageProperty"

string

string

string

binary

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl --location --request POST 'https://developer-api.openbom.com/catalog/277c6246-005d-449a-bc62-46005dd49ad1/image' \

--header 'X-Openbom-AccessToken: eyJraWQiOiJrZHJI...' \

--header 'X-Openbom-AppKey: developerappkey' \

--form 'file=@/Users/user/Downloads/image.jpg' \

--form 'partNumber=part1' \

--form 'imageProperty=Thumbnail image'

  1. curl --location --request POST 'https://developer-api.openbom.com/catalog/277c6246-005d-449a-bc62-46005dd49ad1/image' \

--header 'X-Openbom-appsecret: developerappappsecret' \

--header 'X-Openbom-AppKey: developerappkey' \

--form 'file=@/Users/user/Downloads/image.jpg' \

--form 'partNumber=part1' \

--form 'imageProperty=Thumbnail image'

Response

Status

Response

201

Created

400

BAD_REQUEST

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

28. Delete specific bom document

Deletes specific bom document

Request

Method

URL            

DELETE

/bom/<bomId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document to delete. Can be taken from the listing response. 

Example

  1. curl -X DELETE \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X DELETE \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Empty response indicates successful deletion

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

29. Delete specific catalog document

Deletes specific catalog document

Request

Method

URL            

DELETE

/catalog/<catalogId>

Type

Params

Values

HEAD

HEAD

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The id of the catalog document to retrieve. Can be taken from the listing response. 

Example

  1. curl -X DELETE \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5\

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X DELETE \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5\

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Empty response indicates successful deletion

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

30. Remove part from bom document

Removes specific part from specified bom document

Request

Recommended:

Method

URL            

DELETE

/bom/<bomId>/removepart?partNumber=<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

partNumber

string

string

string

string

Deprecated:

Method

URL            

DELETE

/bom/<bomId>/removepart/<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

<partNumber>

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document to remove part from. Can be taken from the listing response. 

<partNumber>

The partNumber to remove.

Example

Recommended:

  1. curl -X DELETE \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/removepart?partNumber=p1 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X DELETE \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/removepart?partNumber=p1 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Deprecated:

  1. curl -X DELETE \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/removepart/p1 \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X DELETE \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/removepart/p1 \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Empty response indicates successful deletion

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

31. Remove part from catalog document

Removes specific part from specified catalog document

Request

Recommended:

Method

URL            

DELETE

/catalog/<catalogId>/removepart?partNumber=<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

partNumber

string

string

string

string

Deprecated:

Method

URL            

DELETE

/catalog/<catalogId>/removepart/<partNumber>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

<partNumber>

string

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The id of the catalog document to remove part from. Can be taken from the listing response. 

<partNumber>

The partNumber to remove.

Example

Recommended:

  1. curl -X DELETE \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5/removepart?partNumber=p1\

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X DELETE \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5/removepart?partNumber=p1\

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Deprecated:

  1. curl -X DELETE \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5/removepart/p1\

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X DELETE \

https://developer-api.openbom.com/catalog/338c9e50-fe66-4a17-8c9e-50fe66ea17b5/removepart/p1\

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Empty response indicates successful deletion

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

32. List Event Subscriptions

Get all         s specific user subscribed to.

Request

Method

URL            

GET

/event/subscriptions

Type

Params

Values

HEAD

HEAD

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -X GET \

  https://developer-api.openbom.com/event/subscriptions \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

  https://developer-api.openbom.com/event/subscriptions \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be an array of objects representing event subscriptions 

[

   {

       "id": "63f59d6e81960f29d4dba0db",

       "eventType": "ITEM_REVISION",

       "objectId": "somepartnumber",

       "userEmail": "user@tld.tld",

       "callbackUrl": "https://someservice/post",

       "active": true,

       "created": "2023-02-22T04:43:26.603Z",

       "updated": "2023-02-22T04:43:26.603Z",

       "userData": "userdata"

   }

]

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

33. Subscribe to event or update subscription

Subscribe to specific event type supported by the system.

Supported event type values are : ITEM_REVISION

Request

Method

URL            

POST

/event/subscription

Type

Params

Values

HEAD

HEAD

POST Data

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<json_params>

{

        "eventType":"ITEM_REVISION",

        "objectId":"partNumber",

//callbackUrl param must specify url to the secure, publicly available service, that supports post requests

        "callbackUrl":"https://someservice/post",

//the value for user data will be included with each call to callbackUrl

        "userData":"data" (optional param) if set will be sent with every request to callbackUrl

}

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

Example

  1. curl -L -X POST \

  https://developer-api.openbom.com/event/subscription \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU1NYUZuSnFhSkhUaD...' \

  -H 'x-openbom-appkey: developerappkey' \

  -H 'Content-Type: application/json' \

--data-raw '{"eventType":"ITEM_REVISION","objectId":"somePartNumber","callbackUrl":"https://someservice/post","userData":"userData"}'

  1. curl -L -X POST \

  https://developer-api.openbom.com/event/subscription \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey' \

  -H 'Content-Type: application/json' \

--data-raw '{"eventType":"ITEM_REVISION","objectId":"somePartNumber","callbackUrl":"https://someservice/post","userData":"userData"}'

Response

Status

Response

200

Response will be created event subscription

{

   "userData": "userData",

   "created": "2023-02-22T04:43:26.603Z",

   "active": true,

   "callbackUrl": "https://someservice/post"",

   "userEmail": "user@email",

   "eventType": "ITEM_REVISION",

   "id": "63f59d6e81960f29d4dba0db",

   "updated": "2023-02-22T05:55:12.794Z",

   "objectId": "somePartNumber"

}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

34. Upload file to openbom storage

Files can be uploaded to openbom storage when there is enough space assigned for the user or team. Normally user would upload the file to the storage and then update their catalog or bom document with the link to the file in corresponding column. The file upload is a single operation, the upload API will only upload file to the storage and will not update corresponding document.

The url to save is as the value in the document in reference column for accessing the uploaded file should be of the following format:

https://developer-api.openbom.com/files/cloud/cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF

Where cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF is the uploaded file key in storage.

Request

Method

URL            

POST

/files/upload/<documentId>-<fileName>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

POST

Form-Data

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<documentId>

<fileName>

parts = uploaded file

string

String

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<documentId>

The id of the document that will hold the link to the uploaded file. Can be catalog id or bom Id.

<fileName>

The name of the file.

POST body is form-data with one parameter name “parts” with value of uploaded file.

Example

  1. curl -L -X POST https://developer-api.openbom.com/files/upload/cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF \

-H 'x-openbom-appkey: developerappkey' \

-H 'x-openbom-accesstoken: eyJraWQiOiJYMEdzU…'\

 --form 'parts=@"/Users/user1/Downloads/Assembly1.PDF"'

  1. curl -L -X POST https://developer-api.openbom.com/files/upload/cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF \

-H 'x-openbom-appkey: developerappkey' \

-H 'x-openbom-appsecret: developerappappsecret' \

 --form 'parts=@"/Users/user1/Downloads/Assembly1.PDF"'

Response

Status

Response

200

Response body

{

  "status": "CREATED",

  "keys": [

    "cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF"

  ]

}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

        35. Download files from openbom storage

Retrieve file by url from openbom document. The url is provided inside the bom or catalog json response from get specific bom or catalog APIs.

Request

Method

URL            

GET

/files/cloud/<documentId>-<fileName>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<documentId>

<fileName>

string

String

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<documentId>

The id of the document that holds the link to the uploaded file. Can be catalog id or bom Id.

<fileName>

The name of the file.

Example

  1. curl -L -X GET https://developer-api.openbom.com/files/cloud/cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF \

-H 'x-openbom-appkey: developerappkey' \

-H 'x-openbom-accesstoken: eyJraWQiOiJYMEdzU…'\

  1. curl -L -X GET https://developer-api.openbom.com/files/cloud/cb811a0b-7ec6-4e96-811a-0b7ec63e9620-Assembly1.PDF \

-H 'x-openbom-appkey: developerappkey' \

-H 'x-openbom-appsecret: developerappappsecret' \

Response

Status

Response

200

Response will be a file from openbom storage.

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

36. Export specific bom document

Export BOM document stored in openbom. Bom can be exported in next formats: JSON, CSV, XLS. Next view level can be applied: SINGLE, MULTI, FLATTENED. Additionally images or/and files from bom can be added to the exported archive.

Request

Method

URL            

GET

/bom/<bomId>/export?viewLevel=<viewLevel>&format=<format>
&useview=<useview>&includeImages=<includeImages>
&includeFiles=<includeFiles>&viewid=<viewid>&viewName=<viewName>

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

URL_PARAM

Optional:

URL_PARAM

URL_PARAM

URL_PARAM
URL_PARAM
URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<bomId>

<viewLevel>

<format>

<useview>

<includeImages>

<includeFiles>

<viewid>

<viewName>

string

string

string

string

string

boolean

boolean

boolean

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<bomId>

The id of the bom document to retrieve. Can be taken from the listing response. 

<vieweLevel>

Level in which bom document needs to be exported. Can be provided one of the following values: SINGLE, MULTI, FLATTENED

<format>

Format in which document should be exported. Can be provided one of the following values: JSON, CSV, XLS

Optional query parameters:

<useview>

The default value is “true”. It means that every bom document will be returned according to the view that was associated with it using openbom UI. There are two options to get bom document without view filtering, user can either login to openbom UI, open specific bom document and remove the view assigned to this bom document, or call the get bom API with “useview=false” query parameter: /bom/<bomId>/export?useview=false

<includeImages>

The default value is “false”. When this value is “true”, it means that the images from the bom will be added to the exported archive.

<includeFiles>

The default value is “false”. When this value is “true”, it means that the files from the bom will be added to the exported archive.

<viewName>

Specifies the name of the view to be used when returning the BOM document. This parameter allows for filtering and organizing BOM data according to a specific view configuration. The viewName must be URL-encoded. For example, if the view name is "View Name", it should be passed as "View%20Name".
<viewid>

Specifies the ID of the view to be used when returning the BOM document. This parameter provides an alternative method to viewName.

Example

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/export?viewLevel=SINGLE&format=JSON&includeImages=true \

  -H 'x-openbom-accesstoken: eyJraWQiOiJjSVAyRU...' \

  -H 'x-openbom-appkey: developerappkey'

  1. curl -X GET \

https://developer-api.openbom.com/bom/49c6f1f3-7006-48fc-86f1-f3700628fcff/export?viewLevel=SINGLE&format=JSON&includeImages=true \

  -H 'x-openbom-appsecret: developerappappsecret' \

  -H 'x-openbom-appkey: developerappkey'

Response

Status

Response

200

Response will be a json, csv, or xls file represents a bom document

if images and files are not included. Otherwise response will be a

zip archive

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

37. Create a Revision for an Inventory Item

Creates a revision for a given inventory and part number. This endpoint allows users to create a revision of an inventory item.

Request

Method

URL            

POST

/inventory/{catalogId}/revision

Type

Params

Values

HEAD

HEAD

URL_PARAM

POST

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

<json_params>

{

        "partNumber":"",

        "revision":"",

        "revisionNumber":"",

      "saveAllLevels":"",

}

string

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The ID of the inventory item for which the revision is being created.  <json_params>

  {

    "partNumber": "12345-XYZ",  // Actual item’s part number

    "revision": "Q2-Rev1", // (Optional) The user-provided revision description.

    "revisionNumber": "25" // (Optional) The user-provided revision number. If not specified, the last revision number + 1 will be used.
   
"saveAllLevels": false // (Optional) If true then all sublevels should have their revision incremented

  }

Example

  1. curl -L -X POST https://developer-api.openbom.com/inventory/cb811a0b-7ec6-4e96-811a-0b7ec63e9620/revision \
    -H 'x-openbom-appkey: developerappkey' \
    -H 'x-openbom-accesstoken: eyJraWQiOiJYMEdzU…' \
    -H 'Content-Type: application/json' \
    -d '{
    "partNumber": "12345-XYZ",
    "revision": "Q2-Rev1",
    "revisionNumber": "2",
    "saveAllLevels": false
    }'

  1. curl -L -X POST https://developer-api.openbom.com/inventory/cb811a0b-7ec6-4e96-811a-0b7ec63e9620/revision \
    -H 'x-openbom-appkey: developerappkey' \
    -H 'x-openbom-accesstoken: eyJraWQiOiJYMEdzU…' \
    -H 'Content-Type: application/json' \
    -d '{
    "partNumber": "12345-XYZ",
    }'

Response

Status

Response

200

Response body

{

  "revisionNumber": "2",

  "docId": "cb811a0b-7ec6-4e96-811a-0b7ec63e9620",

  "partNumber": "2",

  "state": "Released",

  "revisionCreatedBy": "user@example",

  "revision": "Q2-Rev1",

}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

38. Get specific item for catalog document by part number

Receive the json representation of the property table document stored in OpenBOM.

Request

Method

URL            

GET

catalog/<catalogId>/item

Type

Params

Values

HEAD

HEAD

URL_PARAM

URL_PARAM

X-OpenBOM-AppKey

X-OpenBOM-AccessToken

<catalogId>

<partNumber>

string

String

string

string

X-OpenBOM-AppKey

 X-OpenBOM-AppKey  is the application key that developer received from OpenBOM

X-OpenBOM-AccessToken

X-OpenBOM-AccessToken value is the value of the access_token parameter that was given in response to /login

<catalogId>

The id of the catalog document containing the item.

<partNumber>

Part number of the item.

Example

  1. curl -L -X GET https://developer-api.openbom.com/catalog/cb811a0b-7ec6-4e96-811a-0b7ec63e9620/item?partNumber=PN-L13 \

-H 'x-openbom-appkey: developerappkey' \

-H 'x-openbom-accesstoken: eyJraWQiOiJYMEdzU…'\

  1. curl -L -X GET https://developer-api.openbom.com/catalog/cb811a0b-7ec6-4e96-811a-0b7ec63e9620/item?partNumber=PN-L13 \

-H 'x-openbom-appkey: developerappkey' \

-H 'x-openbom-appsecret: developerappappsecret' \

Response

Status

Response

200

Response will be a json object representing a catalog rowdata information.

{

    "id": "cb811a0b-7ec6-4e96-811a-0b7ec63e9620",

    "name": "test_catalog",

    "modifiedDate": "17 Aug 2024; 21:52:54 GMT",

    "createdDate": "17 Aug 2024; 21:52:54 GMT",

    "modifiedBy": "user_email@example.com",

    "createdBy": "user_email@example.com",

    "columns": [

        "Part Number",

        "Description"

    ],

    "cells": [

        [

            "PN-L13",

            "PN-L13 Description"

        ]

    ],

    "type": "catalog"

}

401

{"error":"Missing or invalid access token."}

403

{"error":"Missing or invalid developer application key[app_key]"}

500

{"error":"Something went wrong. Please try again later."}

Structures

  1. BOM item in boms listing array

{

        "nodeId": 0,

        "bomId": "0",

        "id": "0",

        "name": "",

        "nameuri": "",

        "user": "",

        "status": "",

        "permissionString": "",

        "permission": 0,

        "modifiedBy": "",

        "modified": 0,

        "bomPartNumber": "",

        "productionBatch": false,

        "released": false

}

  1. BOM document

        {

        "id": "ef9a204a-a8fe-48ed-9a20-4aa8fef8ede3", //The Id of the bom document

        "type": "bom", // the type will always have the value of “bom”

        "partNumber": "somebomname", // part number for this bom document

        "name": "somebomname", // the name of the bom document

        "modifiedDate": "07 Aug 2018; 15:48:27 GMT", // date when bom was modified

        "createdDate": "07 Aug 2018; 15:47:33 GMT", // date when bom was created

        "modifiedBy": "user@email", // user that modified this document

        "createdBy": "user@email", // user that created this document

        "columns": [  // Array of all column names in bom document,

            "Part Number",

            "Thumbnail image",

            "Description",

            "Quantity",

            "Cost",

            “PDFFile”

        ],

        "cells": [ // Array of arrays representing tabular data, order is according to columns array

            [

      "Part 2",

   "https://api.openbom.com/document/02ac0179-ffe5-423b-ac01-79ffe5123bbf/image?filename=Screw.png",

      "Part 2 D        escription",

      3,

      5,

"<A0002.PDF> https://api.openbom.com/files/cloud/cb811a0b-7ec6-4e96-811a-0b7ec63e9620-A0002.PDF" // Values of the reference type displayed in format: “<url label> url”. If the url points to the file stored in the openbom storage, it can be accessed/downloaded by following the link and providing authentication headers: X-OpenBOM-AppKey and X-OpenBOM-AccessToken

    ],

    [

      "part1",

      "null",

      "part1 description",

      1,

      2,

     “”

    ]

        ],

        "totalCells": [ // Array of total values for each column

            [

                "",

                "",

                "",

                "",

                7

            ]

        ]

    }

  1. Catalog item in catalogs listing array

    {

        "nodeId": 0,

        "itemsId": "0",

        "id": "0",

        "name": "",

        "user": "",

        "status": "",

        "permissionString": "",

        "permission": 0,

        "modifiedBy": "",

        "modified": 0

    }

  1. Catalog document

    {
       "
id": "",
       "
type": "",
       "
name": "",
       "
modifiedDate": "",
       "
createdDate": "",
       "
modifiedBy": "",
       "
createdBy": "",
       "
columns": [],
       "
cells": [[],[]]
   }

  1. Property table item in property tables listing array

TBD

  1. Property table document

Glossary

Conventions

Status Codes

All status codes are standard HTTP status codes. The below ones are used in this API.

2XX - Success of some kind

4XX - Error occurred in client’s part

5XX - Error occurred in server’s part

Status Code

Description

200

OK

201

Created

202

Accepted (Request accepted, and queued for execution)

400

Bad request

401

Authentication failure

403

Forbidden

404

Resource not found

405

Method Not Allowed

409

Conflict

412

Precondition Failed

413

Request Entity Too Large

429

Too Many Requests

500

Internal Server Error

501

Not Implemented

503

Service Unavailable