TRANXACT.AI Help

Supply Chain · Product Configurator

Configurator · Options

The answers. An option with an item puts a part in the product; one without is a characteristic that changes price and paperwork.

Type REST6 operationsBase path /api/scm/config-optionsPublished as /api/v1/config-options

Download specification (OpenAPI 3.1) Screen: Configurator · Options

Overview

PackageSupply Chain
AuthenticationBearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key
AuthorizationThe caller's roles must hold Supply Chain › Configurator · Options on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen.
Tablecpq.options · kept per company (and organisational unit where it has one)
RecordCreated, changed and (where the screen allows) deleted; key id
RulesThe same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail.

API reference

6 operations. Open one for its parameters, bodies, responses and a sample request.

GET/api/scm/config-optionsList configurator · options

Query parameters

NameDescriptionExample
limitRows per page (50 by default, at most 200)limit=100
offsetRows to skipoffset=200
qFree-text search over the search columnsq=acme
sortcolumn:asc or column:desc, several separated by commassort=created_at:desc
filterA JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sortedfilter={"col":"status","op":"eq","value":"open"}
<field>=<value>Shorthand for "field is value" 

Response 200

{
  "rows": [
    {
      "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "code": "COD-000001",
      "name": "Example",
      "description": "text",
      "item_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
      "quantity": "12.0000",
      "uom": "text",
      "price_delta": "1250.00",
      "cost_delta": "1250.00",
      "lead_time_delta_days": 10,
      "weight_delta_kg": "1250.00",
      "is_default": true
    }
  ],
  "count": 1
}

Sample request

curl "https://demo.tranxact.ai/api/scm/config-options?limit=20" \
  -H "Authorization: Bearer $TOKEN"
GET/api/scm/config-options/{id}Read one config options

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Response 200

{
  "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "description": "text",
  "item_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "quantity": "12.0000",
  "uom": "text",
  "price_delta": "1250.00",
  "cost_delta": "1250.00",
  "lead_time_delta_days": 10,
  "weight_delta_kg": "1250.00",
  "is_default": true
}

404 when no record with that id is visible to the caller.

Sample request

curl "https://demo.tranxact.ai/api/scm/config-options/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"
POST/api/scm/config-optionsCreate a config options

Request body

The record as JSON. Fields marked Yes are required.

FieldTypeRequiredDescription
model_iduuidYesModel
class_iduuidYesQuestion — Choose the model first; only its questions are offered.
codetextYesCode
nametextYesOption
descriptiontextNoDescription
item_iduuidNoItem it adds — Leave empty for a characteristic that adds no part.
quantitynumericNoQuantity
uomtextNoUom
price_deltanumericNoPrice change
cost_deltanumericNoCost change
lead_time_delta_daysintegerNoLead time change (days)
weight_delta_kgnumericNoWeight change (kg)
is_defaultbooleanNoChosen by default
is_mandatorybooleanNoFitted as standard, cannot be removed
forces_engineeringbooleanNoTurns the whole order into engineer-to-order — One special bracket is all it takes, and the order screen has to know.
sort_orderintegerNoOrder
is_activebooleanNoActive
effective_fromdateNoIn force from — The date this version of the row takes effect. Leave it as today unless you are dating a change ahead.
effective_todateNoUntil — Leave empty for open-ended. Setting it ends this version rather than deleting it.
value_kindtextNoThe answer is a value the person enters — "To be specified": the option is chosen, and then the length, size or wording itself is typed in. Leave blank for an ordinary option.
Allowed: number text
value_labeltextNoWhat to ask for — e.g. Stem length
value_uomtextNoUnit of the value — e.g. mm
value_minnumericNoSmallest allowed
value_maxnumericNoLargest allowed
value_sets_quantitybooleanNoThe value is the quantity of the item it adds — 250 mm of stem becomes 250 of the pipe this option adds (times its own quantity) — priced, costed and put in the BOM.
value_decimalssmallintNoDecimal places allowed — For a number: 2 accepts 125.25 and refuses 125.255. Leave empty for any.
value_max_lengthsmallintNoMost characters allowed — For text, e.g. 10 for a material such as INC625 or a thread such as M33x4(M).
value_codetextNoValue a rule compares — What a rule reads for this answer — B for Bimetal, 6 for 6". Leave empty and the code is used. Lets two questions both have an answer “B” while their codes differ (GAUGE_TYPE-B, STEM_LOCATION-B).

Sample body

{
  "model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "description": "text",
  "item_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "quantity": "12.0000",
  "uom": "text"
}

Response 201

{
  "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "description": "text",
  "item_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "quantity": "12.0000",
  "uom": "text",
  "price_delta": "1250.00",
  "cost_delta": "1250.00",
  "lead_time_delta_days": 10,
  "weight_delta_kg": "1250.00",
  "is_default": true
}

Sample request

curl -X POST "https://demo.tranxact.ai/api/scm/config-options" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","class_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","code":"COD-000001","name":"Example","description":"text","item_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","quantity":"12.0000","uom":"text"}'
PUT/api/scm/config-options/{id}Change a config options

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

Only the fields to change; fields left out keep their value.

FieldTypeRequiredDescription
model_iduuidYesModel
class_iduuidYesQuestion — Choose the model first; only its questions are offered.
codetextYesCode
nametextYesOption
descriptiontextNoDescription
item_iduuidNoItem it adds — Leave empty for a characteristic that adds no part.
quantitynumericNoQuantity
uomtextNoUom
price_deltanumericNoPrice change
cost_deltanumericNoCost change
lead_time_delta_daysintegerNoLead time change (days)
weight_delta_kgnumericNoWeight change (kg)
is_defaultbooleanNoChosen by default
is_mandatorybooleanNoFitted as standard, cannot be removed
forces_engineeringbooleanNoTurns the whole order into engineer-to-order — One special bracket is all it takes, and the order screen has to know.
sort_orderintegerNoOrder
is_activebooleanNoActive
effective_fromdateNoIn force from — The date this version of the row takes effect. Leave it as today unless you are dating a change ahead.
effective_todateNoUntil — Leave empty for open-ended. Setting it ends this version rather than deleting it.
value_kindtextNoThe answer is a value the person enters — "To be specified": the option is chosen, and then the length, size or wording itself is typed in. Leave blank for an ordinary option.
Allowed: number text
value_labeltextNoWhat to ask for — e.g. Stem length
value_uomtextNoUnit of the value — e.g. mm
value_minnumericNoSmallest allowed
value_maxnumericNoLargest allowed
value_sets_quantitybooleanNoThe value is the quantity of the item it adds — 250 mm of stem becomes 250 of the pipe this option adds (times its own quantity) — priced, costed and put in the BOM.
value_decimalssmallintNoDecimal places allowed — For a number: 2 accepts 125.25 and refuses 125.255. Leave empty for any.
value_max_lengthsmallintNoMost characters allowed — For text, e.g. 10 for a material such as INC625 or a thread such as M33x4(M).
value_codetextNoValue a rule compares — What a rule reads for this answer — B for Bimetal, 6 for 6". Leave empty and the code is used. Lets two questions both have an answer “B” while their codes differ (GAUGE_TYPE-B, STEM_LOCATION-B).

Sample body

{
  "model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73"
}

Response 200

{
  "id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "code": "COD-000001",
  "name": "Example",
  "description": "text",
  "item_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
  "quantity": "12.0000",
  "uom": "text",
  "price_delta": "1250.00",
  "cost_delta": "1250.00",
  "lead_time_delta_days": 10,
  "weight_delta_kg": "1250.00",
  "is_default": true
}

Sample request

curl -X PUT "https://demo.tranxact.ai/api/scm/config-options/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","class_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73"}'
DELETE/api/scm/config-options/{id}Delete a config options

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Response 200

{ "deleted": true }

Many documents are cancelled or reversed instead; the API refuses a delete the screen would refuse.

Sample request

curl -X DELETE "https://demo.tranxact.ai/api/scm/config-options/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
  -H "Authorization: Bearer $TOKEN"
POST/api/scm/config-options/{id}/copyCopy

Path parameters

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

The keys this action reads (* = required; "one of" lists the only values):

overrides, preview, withLines

Response

200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.

Sample request

curl -X POST "https://demo.tranxact.ai/api/scm/config-options/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"overrides":"value","preview":"value","withLines":"value"}'

Data model

Every field of a config options, as the API returns it. Field names are the JSON keys; any of them can be filtered and sorted on a list.

FieldTypeAccessDescription
iduuidread onlyId
org_iduuidread onlyOrg id
model_iduuidread, writeModel
class_iduuidread, writeQuestion — Choose the model first; only its questions are offered.
codetextread, writeCode
nametextread, writeOption
descriptiontextread, writeDescription
item_iduuidread, writeItem it adds — Leave empty for a characteristic that adds no part.
quantitynumericread, writeQuantity
uomtextread, writeUom
price_deltanumericread, writePrice change
cost_deltanumericread, writeCost change
lead_time_delta_daysintegerread, writeLead time change (days)
weight_delta_kgnumericread, writeWeight change (kg)
is_defaultbooleanread, writeChosen by default
is_mandatorybooleanread, writeFitted as standard, cannot be removed
forces_engineeringbooleanread, writeTurns the whole order into engineer-to-order — One special bracket is all it takes, and the order screen has to know.
sort_orderintegerread, writeOrder
is_activebooleanread, writeActive
effective_fromdateread, writeIn force from — The date this version of the row takes effect. Leave it as today unless you are dating a change ahead.
effective_todateread, writeUntil — Leave empty for open-ended. Setting it ends this version rather than deleting it.
value_kindtextread, writeThe answer is a value the person enters — "To be specified": the option is chosen, and then the length, size or wording itself is typed in. Leave blank for an ordinary option.
Allowed: number text
value_labeltextread, writeWhat to ask for — e.g. Stem length
value_uomtextread, writeUnit of the value — e.g. mm
value_minnumericread, writeSmallest allowed
value_maxnumericread, writeLargest allowed
value_sets_quantitybooleanread, writeThe value is the quantity of the item it adds — 250 mm of stem becomes 250 of the pipe this option adds (times its own quantity) — priced, costed and put in the BOM.
submodel_iduuidread onlySubmodel id
component_kindtextread onlyComponent kind
value_decimalssmallintread, writeDecimal places allowed — For a number: 2 accepts 125.25 and refuses 125.255. Leave empty for any.
value_max_lengthsmallintread, writeMost characters allowed — For text, e.g. 10 for a material such as INC625 or a thread such as M33x4(M).
created_attimestamp with time zoneread onlyCreated at
created_byuuidread onlyCreated by
updated_attimestamp with time zoneread onlyUpdated at
updated_byuuidread onlyUpdated by
value_codetextread, writeValue a rule compares — What a rule reads for this answer — B for Bimetal, 6 for 6". Leave empty and the code is used. Lets two questions both have an answer “B” while their codes differ (GAUGE_TYPE-B, STEM_LOCATION-B).
xf_text_1textread onlyXf text 1
xf_text_2textread onlyXf text 2
xf_text_3textread onlyXf text 3
xf_text_4textread onlyXf text 4
xf_text_5textread onlyXf text 5
xf_num_1numericread onlyXf num 1
xf_num_2numericread onlyXf num 2
xf_num_3numericread onlyXf num 3
xf_date_1dateread onlyXf date 1
xf_date_2dateread onlyXf date 2

Errors

StatusMeaning
400The request could not be read: a filter that is not JSON, a bad parameter
401No credential, or it is wrong, revoked or expired
403The caller's roles do not hold Supply Chain › Configurator · Options for this verb, or the address or origin is not allowed
404No record with that id is visible to the caller
409A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else
422Refused by the same validation as the screen; the error names the field and why

Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.