facility network map.md

Facility Network Map

Authentication

Include the following headers in your requests:

Permissions

Make sure that your api user is created with a role that has external-api-shipper-network-map permission

Endpoint

Response

Response Body

When the request succeeds, the endpoint returns a GeoJSON FeatureCollection whose structure follows FacilityNetworkMapSchema:

Request example

curl --location 'https://api.genlogs.io/facility/0x4Y4CTmYr6kauPugLT9k4zg/network-map' \
--header 'Content-Type: application/json' \
--header 'access-token: <access-token>' \
--header 'x-api-key: <x-api-key>'

Retrieve the GeoJSON network map for a facility

Returns the GeoJSON network map associated with the specified facility.

{"openapi":"3.0.2","info":{"title":"Shipper API - Facility Network Map","version":"1.0.0"},"tags":[{"name":"Facilities","description":"Returns the facility network map in GeoJSON format"}],"servers":[{"url":"https://api.genlogs.io"}],"paths":{"/facility/{facility_id}/network-map":{"get":{"summary":"Retrieve the GeoJSON network map for a facility","description":"Returns the GeoJSON network map associated with the specified facility.","operationId":"getFacilityNetworkMap","tags":["Facilities"],"parameters":[{"name":"facility_id","in":"path","required":true,"schema":{"type":"string"},"description":"Trimble identifier for the facility."}],"responses":{"200":{"description":"Facility GeoJSON network map (FeatureCollection)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityNetworkMap"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"403":{"description":"Token expired or user lacks the required role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthError"}}}},"500":{"description":"Unexpected error while fetching or parsing GeoJSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}},"components":{"schemas":{"FacilityNetworkMap":{"type":"object","required":["type","features"],"properties":{"type":{"type":"string"},"features":{"type":"array","items":{"$ref":"#/components/schemas/FacilityNetworkFeature"}}}},"FacilityNetworkFeature":{"type":"object","required":["type","geometry","properties"],"properties":{"type":{"type":"string"},"geometry":{"$ref":"#/components/schemas/GeoJSONGeometry"},"properties":{"type":"object","additionalProperties":true,"description":"Arbitrary metadata associated with the feature."}}},"GeoJSONGeometry":{"type":"object","required":["type","coordinates"],"properties":{"type":{"type":"string","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"]},"coordinates":{"type":"array","items":{},"description":"GeoJSON coordinate array whose structure depends on geometry type."}}},"AuthError":{"type":"object","properties":{"message":{"type":"string"},"subcode":{"type":"integer","description":"Optional subcode with additional error context."}}}}}}}