Links a service object to a service order: a production order with repair_order true. Expanding ProductionOrderHeader returns only links whose order is still active, HistoricProductionOrderHeader only those whose order is archived.

Label in Fledge: SO koppeling prod.: Koppelingstabel service objecten met productie

URLhttps://odata-api.fledge.nl/v2-8/ServiceProductionLinks
Keyadministration_idproduction_order_header_idsales_order_header_idsales_order_line_idservice_object_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASIS
Write licensesBASIS
ScopesFLEDGE_PORTAL

Example requests

A page of rows, with only the fields you need. See Authentication for the token.

curl -G "https://odata-api.fledge.nl/v2-8/ServiceProductionLinks" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=production_order_header_id,sales_order_header_id,sales_order_line_id,service_object_id' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/ServiceProductionLinks');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'production_order_header_id,sales_order_header_id,sales_order_line_id,service_object_id');
url.searchParams.set('$top', '50');

const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const { value } = await response.json();
var url = "https://odata-api.fledge.nl/v2-8/ServiceProductionLinks" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("production_order_header_id,sales_order_header_id,sales_order_line_id,service_object_id"),
    "$top=" + Uri.EscapeDataString("50"));

http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var json = await http.GetStringAsync(url);

One row by its key:

GET https://odata-api.fledge.nl/v2-8/ServiceProductionLinks(administration_id=1,production_order_header_id='{production_order_header_id}',sales_order_header_id='{sales_order_header_id}',sales_order_line_id={sales_order_line_id},service_object_id='{service_object_id}')

Fields

FieldTypeDescription
administration_idkeyInt32Administratienummer
service_object_idkeyStringService object code
production_order_header_idkeyStringOrder nummer
sales_order_line_idkeyInt32Regelnummer

The sales order line, or 0 when the link has none.

sales_order_header_idkeyStringVerkoopordernummer

The sales order, or empty when the link has none.

Relations

Read a related row or list in the same request with $expand, and give it its own $select; a list also needs a $top.

NavigationEntity set
AdministrationAdministrationsone
HistoricProductionOrderHeaderHistoricProductionOrderHeadersone
ProductionOrderHeaderProductionOrderHeadersone
SalesOrderHeaderSalesOrderHeadersone
SalesOrderLineSalesOrderLinesone
ServiceObjectServiceObjectsone
Wingman