This Repository is no longer maintained, for the latest API docs please refer to Infurnia API Docs
- You must have access token, org ID (store_id), email and server path (paste them in utils.js).
- Sales Channels and Price Types must be created (if not, default sales channel and price types can be used).
- Example code uses Laminate as material template, other material templates may be used (for example Granite, Wood, etc. which are returned in the fetch_material_templates response).
- Example code uses miscellaneous_finish as category type, other category types may be used (for example cabinet, wardrobe, panel_core, cabinet_finish, etc. which are returned in the fetch_catgeory_types response).
- Thickenss for finish skus and core_materials can be specified in the sku.height field.
- Additional properties - user may create any number of custom key value pairs.
- You can create Model 3D for a SKU using two ways - either using a GLB file or using OBJ and MTL files. Check the example code for more information on how to pass the appropriate arguments
display_unit field for price_types must be in agreement with pricing_dimension field of sku_category_type for the SKU. Acceptable values of display_unit can be determined as follows:
{
'per_unit_length': [ 'millimetre', 'metre', 'foot' ],
'per_unit_area': [ 'sq_millimetre', 'sq_metre', 'sq_foot' ],
'per_unit_volume': [ 'cu_millimetre', 'cu_metre', 'cu_foot' ],
'per_unit': [ 'per_unit' ],
}
If category_type has the pricing_dimension 'per_unit_length', display_unit for price_types can be 'millimetre', 'metre' or 'foot'.
Please check the pricing quotation code to know more about supported commands and file formats to generate pricing quotation.
The following commands are supported in the production details API
GetPricingQuotationDetailsJSON- Get pricing quotation in JSONGetPricingQuotationXlsx- Get pricing quotation in XLSXGetPricingQuotationPdf- Get pricing quotation in PDFGetPricingQuotationCsv- Get pricing quotation in CSVGetCabinetCompositeBoq- Get cabinet composite BOQGetStandardWoodenRmOutput- Get standard wooden RM outputGetStandardHardwareRmOutput- Get standard hardware RM outputGetCutlistCsv- Get cutlist in CSVGetManufacturingCutlistCsv- Get manufacturing cutlist in CSVGetCurrentBoardTypeCurrentBoard- Get current board type current boardGetCurrentBoardTypeAllBoards- Get current board type all boardsGetAllBoardTypeAllBoards- Get all board type all boardsGetBoardLayoutCount- Get board layout countGetBoardLayoutFinishCount- Get board layout finish countGetFloorplanFloorViews- Get floor plan floor viewsGetFloorplanRoomViews- Get floor plan room viewsGetFulfillmentTags- Get fulfillment tagsGetCNCMachineOutputCix- Get CNC machine output CIXGetCNCMachineOutputMpr- Get CNC machine output MPRGetCNCMachineOutputXcs- Get CNC machine output XCSGetCNCMachineOutputPdf- Get CNC machine output PDFGetAllPresentationSheetsPdf- Get presentation PDF of a design branchPrintElevationViews- Print elevation view in PDF
Use the disable_rendering function in the utils folder to disable rendering for a given design branch. Alternatively, use the enable_rendering function in the utils folder to enable rendering for a given design branch. By default, a design branch has rendering enabled.
Pls check this example code for attaching tags to SKU.
Pls check this example code for fetching all renders for a given design ID.
A new API is supported to get the store info and corresponding default business unit id. This business unit id can be used in the other APIs. Or please ask the Infurnia admin to provide for the valid business unit id
API named as store/get_info
The following APIs have been changed and their example codes have been updated accordingly. Please have a look at the API names, request bodies and response bodies.
API name changed from sales_channel/get to sales_channel/get_of_store
Request body must have the following field include_price_type_mapping: true.
Response body now will have a field called sales_channels which has two more nested fields owned and subscribed representing the owned and subscribed sales channels respectively. You can combine both the arrays to get all the visible sales channels for your Org. For every sales channel, there will be a correpsonding field called price_type_ids.
API name changed from sku_category/add to sku_category/create.
It expects an extra parameter business_unit_id
sku_category/update expects sku_category_id (id of sub category that is to be updated), name, business_unit_id, sku_category_type_id ( if the category is to be moved across sku category types – all tags whose eligibility has been violated as a result of this change would be removed from the sku categroy).
API name changed from sku_sub_category/add to sku_sub_category/create.
It expects an extra parameter business_unit_id
sku_sub_category/update expects sku_sub_category_id (id of sub category that is to be updated), name, order.
API name changed from sku_group/add to sku_group/create.
It expects an extra parameter business_unit_id
It expects an extra parameter business_unit_id
API inventory/get_all_sub_categories expects an extra parameter business_unit_id to fetch the sub categories in the the corresponding business unit. You can use the default business unit ID from store/get_info as mentioned above to fetch the sub categories in the default business unit.
API inventory/get_groups expects an extra parameter business_unit_id to fetch the sub groups in the the given sub category and business unit. You can use the default business unit ID from store/get_info as mentioned above to fetch the groups from the default business unit.
API sku/remove_from_business_unit expects a different parameter in the request body: sku_ids should be the array of SKU IDs to be removed from the business unit and business_unit_id .
API sku_group/remove_from_business_unit expects a different parameter in the request body: sku_group_ids should be the array of SKU Group IDs to be removed from the business unit and business_unit_id.
API sku_group/update expects a different parameter in the request body: sku_group_id should be the id of the SKU Group which is to be updated, business_unit_id, name (optional field) provide the new name of the sku group, sku_sub_category_id (optional field) provide the new SKU Sub Category ID if the sku group need to be moved accross SKU Sub Categories (sku group can only be moved across SKU Sub Categories having the same SKU Category Type).
API sku_sub_category/deprecate expects a different parameter in the request body: sku_sub_category_id should be the ID of the SKU Sub Category to be removed from the store.
API sku_category/deprecate expects a different parameter in the request body: sku_category_id should be the ID of the SKU Category to be removed from the store.
API sku/update does not support identifiers and updates in the request body. Instead of identifiers, it expects sku_id to be the ID of the SKU to be updated. Instead of updates, it expects the corresponding fields like name, order, model_no (previously sent in the updates field) in the request body. To move sku across sku groups, pass in the new sku group id in the sku_group_id field of the body (sku can only be moved accross sku groups having the same sku category types).
API design/disable_branch_rendering is changed to design_branch/update_rendering_enabled_status with an extra parameter status: disable along with the design_branch_id parameter in the request body.
API design/disable_branch_rendering is changed to design_branch/update_rendering_enabled_status with an extra parameter status: enable along with the design_branch_id parameter in the request body.
API sku/get_tags expects a different parameter sku_ids instead of ids in the request body.
API sku/attach_tags expects a different parameter sku_ids instead of ids in the request body.
API sales_channel/add_skus and sales_channel/remove_skus can be used to map and unmap skus to a sales channel respectively
Both expect parameter sku_ids which is a list(Array) of skus that needs to be added or removed from the sales channel and sales_channel_id which the id of the sales channel in which the skus are to added.
To get sku_id the following ways can be used
api inventory/get_all_sub_categories can be used to to get the sub category tree (both owned/subscribed) for a given store, sub category id can be inferred from its result by seraching on the name or individual sub category ids can directly picked selecting a particaular sub category , the last path segments/URL path component is the sku_sub_category id.
eg. in /catalogue/finish/984703946002946389/9927264560914371958/ 9927264560914371958 is the sub_category id.
Once a sub_category_id is selected, sku group and underlying skus for a given sku category id can be obtained by the api inventory/get_groups.
API price/update is used to update the price of a sku, it accepts params sku_id, business_unit_id, price, tax, margin, display_unit, sales_channel_id, price_type_id
If the price to be updated is the default price or the sku business_unit_id should be passed, and both sales_channel_id and price_type_id should be set as null.
If the price is to be set of sku for a particular sales channel and price type specify both sales_channel_id and price_type_id for which the price is to updated.
To get sales channels and their mapped price_types API sales_channel/get_of_store can be used with parameter include_price_type_mapping set as true in the body,
API sku/get is used to fetch information corresponding to a list of sku ids.
-
Parameters
business_unit_id(string): The ID of your business unit.identifiers(stringified JSON): A JSON object with parameteridcontaining an array of SKU IDs you want to retrieve information for. This JSON object needs to be converted into strigified format. For example, to create stringified JSON for 2 SKUs having ids 1499253168870, 1488453826100.- Firstly generate a JSON in the format:
{"id":["1499253168870", "1488453826100"]} - Then stringify it to obtain it in the following format:
"{\"id\":[\"1499253168870\", \"1488453826100\"]}"
- Firstly generate a JSON in the format:
-
Sample Request:
{
"business_unit_id": "your_business_unit_id",
"identifiers": "{\"id\":[\"1499253168870\", \"1488453826100\"]}"
}Caution: If you need to retrieve information for multiple SKUs, it's recommended to pass a list of SKU IDs in a single request rather than calling the API individually for each ID. This practice helps avoid potential issues like server request blocks and improves efficiency.