openapi: 3.0.3 info: title: Turvo Public Accounts Locations API description: 'The Turvo Public API is a JSON REST interface to the Turvo collaborative transportation management system (TMS). It exposes the core logistics objects - shipments, orders, locations, accounts (customers), and carriers - plus real-time tracking via location updates and event-driven webhooks. ACCESS MODEL: The API is self-service but tenant-gated. Credentials (Client ID, Client Secret, API Key) are provisioned from the API profile inside a customer''s Turvo tenant, and the live interactive reference sits behind a Turvo login at app.turvo.com/lobby/documentation. A sandbox tenant is available for testing. MODELING NOTE: Because Turvo''s interactive reference is tenant-gated, the endpoint paths, parameters, and schemas in this document are HONESTLY MODELED from Turvo''s publicly described resource set and its documented OAuth 2.0 + x-api-key authentication pattern. They are a faithful structural model of the v1 API, not a verbatim copy of the live specification; confirm exact fields against your tenant''s own reference.' version: '1.0' contact: name: Turvo url: https://turvo.com servers: - url: https://publicapi.turvo.com/v1 description: Turvo Public API (production) - url: https://my-sandbox.turvo.com/v1 description: Sandbox tenant (per-tenant host; replace with your sandbox subdomain) security: - bearerAuth: [] apiKeyAuth: [] tags: - name: Locations description: Facility and address master used as shipment stops. paths: /locations/list: get: operationId: listLocations tags: - Locations summary: List locations description: Lists locations (facilities) in the tenant. parameters: - $ref: '#/components/parameters/Start' - $ref: '#/components/parameters/PageSize' responses: '200': description: A page of locations. content: application/json: schema: $ref: '#/components/schemas/LocationList' '401': $ref: '#/components/responses/Unauthorized' /locations: post: operationId: createLocation tags: - Locations summary: Create a location description: Creates a new location with address, geocoordinates, and contacts. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Location' responses: '200': description: The created location. content: application/json: schema: $ref: '#/components/schemas/Location' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' /locations/{id}: parameters: - $ref: '#/components/parameters/Id' get: operationId: getLocation tags: - Locations summary: Retrieve a location description: Retrieves a single location by its Turvo ID. responses: '200': description: The requested location. content: application/json: schema: $ref: '#/components/schemas/Location' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: updateLocation tags: - Locations summary: Update a location description: Updates an existing location. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Location' responses: '200': description: The updated location. content: application/json: schema: $ref: '#/components/schemas/Location' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' components: parameters: PageSize: name: pageSize in: query required: false description: Maximum number of records to return per page. schema: type: integer default: 50 Id: name: id in: path required: true description: The Turvo resource ID. schema: type: string Start: name: start in: query required: false description: Zero-based offset of the first record to return. schema: type: integer default: 0 schemas: Location: type: object properties: id: type: string name: type: string type: type: string description: Facility type, such as warehouse or distribution center. address: $ref: '#/components/schemas/Address' geo: type: object properties: lat: type: number lng: type: number contacts: type: array items: $ref: '#/components/schemas/Contact' hoursOfOperation: type: string LocationList: type: object properties: details: type: array items: $ref: '#/components/schemas/Location' pagination: $ref: '#/components/schemas/Pagination' Pagination: type: object properties: start: type: integer pageSize: type: integer totalRecordsInPage: type: integer moreAvailable: type: boolean Error: type: object properties: Status: type: string example: error code: type: integer message: type: string details: type: object additionalProperties: true Contact: type: object properties: name: type: string email: type: string phone: type: string Address: type: object properties: line1: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid Bearer token or API key. content: application/json: schema: $ref: '#/components/schemas/Error' ValidationError: description: The request payload failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer description: 'OAuth 2.0 Bearer access token obtained from POST /oauth/token. Passed as Authorization: Bearer YOUR_ACCESS_TOKEN.' apiKeyAuth: type: apiKey in: header name: x-api-key description: Per-tenant API key from the Turvo tenant API profile, sent on every request.