### Example JSON Error Response Data Source: https://developer.avinodegroup.com/docs/error-handling-guide This snippet shows an example of a JSON response indicating a 'Not found' error. It includes meta information with a list of errors, warnings, and infos. The 'code' field specifies the type of error. ```json { "meta": { "errors": [ { "title": "Not found", "code": "NOT_FOUND" } ], "warnings": [], "infos": [] } } ``` ```json { "meta" : { "errors" : [ ], "warnings" : [ ], "infos" : [ ] } } ``` -------------------------------- ### POST /tripmsgs/{requestId}/submitQuote - Price Line Items Example Source: https://developer.avinodegroup.com/docs/download-respond-rfq This example demonstrates how to structure the `lineItems` array in a `submitQuote` API request. It includes details such as `visibleToBuyer`, `displayName`, `description`, `type`, `price`, `formattedUnitPrice`, and `formattedQuantity` for each line item. ```APIDOC ## POST /tripmsgs/{requestId}/submitQuote ### Description Allows operators to submit a quote for a trip request, including detailed price line items and specifying buyer visibility for each item. ### Method POST ### Endpoint `/tripmsgs/{requestId}/submitQuote` ### Parameters #### Path Parameters - **requestId** (string) - Required - The unique identifier for the trip request. #### Query Parameters None #### Request Body - **lineItems** (array) - Required - An array of price line item objects. - **visibleToBuyer** (boolean) - Required - Indicates if the line item should be visible to the buyer. - **displayName** (string) - Required - The name of the price line item. - **description** (string) - Optional - A detailed description of the price line item. - **type** (string) - Required - The category or type of the price line item (e.g., "CREW", "POSITIONING", "CATERING", "OTHER"). - **price** (number) - Required - The total price for this line item. - **formattedUnitPrice** (string) - Required - The unit price formatted as a string. - **formattedQuantity** (string) - Required - The quantity formatted as a string. ### Request Example ```json { "requestId": "sample-request-id", "lineItems": [ { "visibleToBuyer": false, "displayName": "Crew Swap", "description": "International crew swap, due to flight duty limitations.", "type": "CREW", "price": 7500, "formattedUnitPrice": "7500", "formattedQuantity": "1" }, { "visibleToBuyer": false, "displayName": "Positioning", "description": "Aircraft repositioning KMIA-KLAS", "type": "POSITIONING", "price": 12000, "formattedUnitPrice": "4000", "formattedQuantity": "3" }, { "visibleToBuyer": true, "displayName": "Catering", "description": "Exclusive catering arrangements, as per client request.", "type": "CATERING", "price": 900, "formattedUnitPrice": "450", "formattedQuantity": "2" }, { "visibleToBuyer": true, "displayName": "Consierge", "description": "Limousine service from hotel to aircraft", "type": "OTHER", "price": 1100, "formattedUnitPrice": "1100", "formattedQuantity": "1" } ] } ``` ### Response #### Success Response (200) - **message** (string) - A success message indicating the quote was submitted. #### Response Example ```json { "message": "Quote submitted successfully." } ``` ### Notes - The total price sent in the API response should reflect the net amount, excluding any applicable sales tax. - Sales taxes should be presented as separate price line items if applicable. - The sum of individual price line items does not necessarily need to match the total net price. ``` -------------------------------- ### Example Avinode Chat Deep Link Source: https://developer.avinodegroup.com/docs/search-in-avinode-from-your-system This JSON example demonstrates the structure of a chat deep link response from the Avinode API. It includes the 'viewInAvinode' action, which allows redirection to a specific chat message within the Avinode Web UI. ```json { "data": { "id": "asellermsg-70609223", "href": "https://services.avinode.com/api/tripmsgs/asellermsg-70609223", "type": "tripmsgs", "links": { ...snip... }, { "lift": [ { ...snip... }, "actions": { "viewInAvinode": { "type": "viewInAvinode", "description": "View in Avinode", "httpMethod": "GET", "href": "https://marketplace.avinode.com/marketplace/mvc/trips/buying/atrip-50646110?source=api#eyJleHBlZE-N0t-w0rKiN6ybGlmdjU4NTYifQ==" } }, "aircraftCategory": "Super midsize jet", "aircraftType": "Challenger 350", "aircraftSuperType": "Challenger 350", "suggestedByAvinode": false, "sourcingDisplayStatus": "Unanswered", "sourcingStatus": 1 } ], ...snip... }, "tripId": "USUKHG" } } ``` -------------------------------- ### Example JSON Error Response for Missing Aircraft Source: https://developer.avinodegroup.com/docs/error-handling-guide This JSON example illustrates an error when a specified aircraft tail is not found or inactive in the system. The 'code' 'MISSING' and 'path' field indicate the specific issue. ```json { "meta": { "errors": [ { "title": "No such marketed aircraft: {aircraftTail}", "code": "MISSING", "path": "lift.aircraftTail" } ], "warnings": [], "infos": [] }, "data": {} } ``` -------------------------------- ### Trip Cancellation Payload Example Source: https://developer.avinodegroup.com/docs/search-in-avinode-from-your-system This JSON example shows the required payload for canceling a trip using the PUT /trips/{id}/cancel endpoint. It includes the trip ID, a message to the seller, and a predefined reason for cancellation. ```json { "id": "atrip-1686310600", "messageToSeller": "Sorry, the client has requested to cancel this trip.", "reason": "BY_CLIENT" } ``` -------------------------------- ### Download RFQ for Requested Trip Source: https://developer.avinodegroup.com/docs/search-in-avinode-from-your-system Fetch the RFQ details for a requested trip via a webhook notification using the GET /rfqs/{id} call. ```APIDOC ## GET /rfqs/{id} ### Description Retrieves the RFQ (Request for Quotation) details for a specific trip ID. ### Method GET ### Endpoint /rfqs/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the RFQ. ### Response #### Success Response (200) - **rfq_details** (object) - The detailed information about the RFQ. #### Response Example ```json { "rfq_details": { "id": "rfq_123", "trip_id": "trip_abc", "provider": "Example Air", "price": 5000, "currency": "USD" } } ``` ``` -------------------------------- ### Example JSON Error Response for Invalid JSON Input Source: https://developer.avinodegroup.com/docs/error-handling-guide This JSON example shows an error where the input JSON cannot be parsed into the expected format. The error code 'ERR_INPUT_INVALID_JSON' clearly indicates the nature of the problem. ```json { "meta": { "errors": [ { "title": "The input JSON could not be parsed to the expected format.", "code": "ERR_INPUT_INVALID_JSON" } ], "warnings": [], "infos": [] } } ``` -------------------------------- ### Avinode Lead API Response Example (JSON) Source: https://developer.avinodegroup.com/docs/download-end-client-leads This is a sample JSON response from the Avinode Lead API when retrieving specific lead data. It includes metadata, lead details, actions, owning company information, creation date, and seller lift details with aircraft categories and price expectations. This data is crucial for understanding the full scope of a lead. ```json { "meta": { "errors": [], "warnings": [], "infos": [] }, "data": { "id": "ecl-1138035", "href": "https://sandbox.avinode.com/api/leads/ecl-1138035", "type": "leads", "actions": { "searchInAvinode": { "type": "searchInAvinode", "description": "Start a search in Avinode", "httpMethod": "GET", "href": "https://sandbox.avinode.com/marketplace/mvc/search/load/ecl-1138035?source=api&origin=api_action" }, "viewInAvinode": { "type": "viewInAvinode", "description": "View in Avinode", "httpMethod": "GET", "href": "https://sandbox.avinode.com/marketplace/mvc/trips/clientlead/ecl-1138035?source=api&origin=api_action" } }, "owningCompany": { "id": "9661EF87-AABD-4054-A8C4-C0FDBEE47EE9", "displayName": "Demo AirNode Europe", "demo": true, "contactInfo": { "emails": [ "jghs@aqsiuhb.com" ], "phone": "+65 90 712 50 93", "mobilePhone": "+64 41 008 15 65", "url": "www.avinode.com", "office": "", "address": "Gamlestads torg 5\n103 84 Asbglxwc\nSweden", "detailedAddress": { "street": "Gamlestads torg 5", "postBox": "", "postCode": "103 84", "city": "Asbglxwc", "country": { "code": "SE", "name": "Sweden" } } }, "active": true }, "createdOn": "2023-06-13T15:07:03.557Z", "sellerLift": [ { "sellerCompany": { "id": "9661EF87-AABD-4054-A8C4-C0FDBEE47EE9", "displayName": "Demo AirNode Europe", "demo": true, "contactInfo": { "emails": [ "jghs@aqsiuhb.com" ], "phone": "+65 90 712 50 93", "mobilePhone": "+64 41 008 15 65", "url": "www.avinode.com", "office": "", "address": "Gamlestads torg 5\n103 84 Asbglxwc\nSweden", "detailedAddress": { "street": "Gamlestads torg 5", "postBox": "", "postCode": "103 84", "city": "Asbglxwc", "country": { "code": "SE", "name": "Sweden" } } }, "active": true }, "lift": [ { "id": "apicat-5368", "aircraftCategory": "Light and super light jet", "priceExpectation": { "currency": "USD", "price": 6350.00, "conversionCurrency": "EUR", "convertedPrice": 5906.56, "priceAsString": "6350" } }, { "id": "acat-220", "aircraftCategory": "Light jet", "priceExpectation": { "currency": "USD", "price": 6350.00, "conversionCurrency": "EUR", "convertedPrice": 5906.56, "priceAsString": "6350" } }, { "id": "acat-221", "aircraftCategory": "Super light jet", "priceExpectation": { "currency": "USD", "price": 6350.00, "conversionCurrency": "EUR", "convertedPrice": 5906.56, "priceAsString": "6350" } } ] } ] } } ``` -------------------------------- ### Initiate a Search in Avinode Source: https://developer.avinodegroup.com/docs/search-in-avinode-from-your-system Initiate a trip search in Avinode by calling the POST /trips operation with the necessary trip details. The response will contain a deep link to open the Avinode search results. ```APIDOC ## POST /trips ### Description Initiates a trip search in Avinode with provided trip information and returns a deep link to the search results. ### Method POST ### Endpoint /trips ### Parameters #### Request Body - **itinerary** (object) - Required - Details of the trip itinerary. - **passengers** (integer) - Required - Number of passengers. - **aircraft_category** (string) - Required - Desired aircraft category. - **date** (string) - Required - The date of the trip (YYYY-MM-DD). - **time** (string) - Required - The time of the trip (HH:MM). Can be 'TBD' if exact time is unknown. ### Request Example ```json { "itinerary": { "origin": {"iata": "LHR"}, "destination": {"iata": "JFK"} }, "passengers": 10, "aircraft_category": "", "date": "2024-12-31", "time": "10:00" } ``` ### Response #### Success Response (200) - **deep_link** (string) - A URL to open the search results in Avinode. #### Response Example ```json { "deep_link": "https://www.avinode.com/search?origin=LHR&destination=JFK&date=2024-12-31&time=10:00" } ``` ``` -------------------------------- ### Webhook Settings and Empty Leg Watchlist Source: https://developer.avinodegroup.com/docs/end-client-empty-leg-subscription This section covers setting up webhooks for 'EmptyLegs' notifications and creating an Empty Leg watchlist. ```APIDOC ## Webhook Settings ### POST /webhooks/settings #### Description Sets up webhook notification settings to receive updates for 'EmptyLegs'. Requires a valid payload. #### Method POST #### Endpoint `/webhooks/settings` #### Request Body - **notificationEvent** (string) - Required - Must be set to "EmptyLegs". - **url** (string) - Required - The URL to which notifications will be sent. #### Request Example ```json { "notificationEvent": "EmptyLegs", "url": "https://your-app.com/webhook-handler" } ``` ## Empty Leg Watchlist ### POST /emptylegs/watches #### Description Creates a watchlist to monitor for specific Empty Legs. Requires a valid payload. #### Method POST #### Endpoint `/emptylegs/watches` #### Request Body - **criteria** (object) - Required - Defines the criteria for the watchlist (e.g., origin, destination, aircraft type). #### Request Example ```json { "criteria": { "origin": "JFK", "destination": "LAX" } } ``` ``` -------------------------------- ### GET /emptylegs/watches/{watchId}/getall Source: https://developer.avinodegroup.com/docs/end-client-empty-leg-subscription Retrieves all currently available empty legs matching a specific watchlist. This is typically called once after initial setup. ```APIDOC ## GET /emptylegs/watches/{watchId}/getall ### Description Retrieves a list of all empty legs that currently match the criteria of a specified Empty Leg Watchlist. This endpoint is intended to be called once upon initial setup of a watchlist. ### Method GET ### Endpoint /emptylegs/watches/{watchId}/getall ### Parameters #### Path Parameters - **watchId** (string) - Required - The ID of the Empty Leg Watchlist. ### Response #### Success Response (200) - **emptyLegs** (array[object]) - A list of empty leg objects matching the watchlist criteria. #### Response Example ```json { "emptyLegs": [ { "id": "el_12345", "departureTime": "2023-10-27T10:00:00Z", "fromAirport": "LHR", "toAirport": "JFK", "aircraftType": "777", "price": 50000 } ] } ``` ``` -------------------------------- ### POST /leads Source: https://developer.avinodegroup.com/docs/end-client-empty-leg-subscription Creates a Client Lead in Avinode Marketplace based on an end client's preferred empty leg. ```APIDOC ## POST /leads ### Description Generates a Client Lead in Avinode Marketplace. This endpoint is used after an end client selects a preferred empty leg, facilitating lead creation. ### Method POST ### Endpoint `/leads` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **emptyLegId** (string) - Required - The ID of the selected Empty Leg. - **clientDetails** (object) - Required - Information about the client making the request. - **name** (string) - Required - Client's name. - **email** (string) - Required - Client's email address. - **phone** (string) - Optional - Client's phone number. - **message** (string) - Optional - Additional message from the client. ### Request Example ```json { "emptyLegId": "emptyleg456", "clientDetails": { "name": "John Doe", "email": "john.doe@example.com", "phone": "+1234567890" }, "message": "Interested in this empty leg." } ``` ### Response #### Success Response (200) - **leadId** (string) - The unique identifier of the created Client Lead. - **status** (string) - The status of the lead creation (e.g., "success"). #### Response Example ```json { "leadId": "lead789", "status": "success" } ``` ``` -------------------------------- ### API Basics and Security Source: https://developer.avinodegroup.com/docs/api-basics Overview of Avinode API's architectural style, security protocols, and access requirements. ```APIDOC ## API Basics All API services are based on the **REST** architectural style and they are all stateless. All calls to the APIs require a secure **HTTPS **connection. Supported security protocol is **TLS 1.2**. ## Access and API Permissions Accessing the APIs require an active API connection on your Avinode (sandbox) account. API connections are currently created and maintained by Avinode support staff. Please contact your sales representative to get started on your project. ### Permissions Each API connection have a set of permissions that restricts which operations that can be called. ### Company access Each API connection is connected to one Avinode or Schedaero member’s company account. This is used to determine which company accounts' data the API connection can access and potentially update. If the application needs to handle data for multiple companies, it needs to handle multiple API connections. ### Setup API connections are currently created and maintained by the Avinode and Schedaero support staff. ### Application specific If different kinds of applications are implemented, each application should be able to use separate API connections. ### Automatic expiration API connections that are not used for 60 days are automatically deactivated. ## JSON Input and Output Format The [API reference](https://developer.avinodegroup.com/reference/) pages has information about the JSON format returned by all the available API operations and also the JSON format expected by any POST and PUT operation. There is also a [Swagger page](https://sandbox.avinode.com/swagger/AvinodeGroup.jsp) available. > 📘 API reference and Swagger access > > Use your issued API token/authorization to try out the API at the [API reference](https://developer.avinodegroup.com/reference/) section, or at the [Swagger](https://sandbox.avinode.com/swagger/AvinodeGroup.jsp) page. Without credentials you can still browse what is available. ``` -------------------------------- ### Example JSON Error Response for Rate Limit Exceeded Source: https://developer.avinodegroup.com/docs/error-handling-guide This JSON example shows a 'Rate limit exceeded' error, indicating that too many requests have been made within a specific time period. The error is captured in the 'errors' array within the 'meta' object. ```json { "meta" : { "errors" : [ { "title" : "Rate limit exceeded." } ], "warnings" : [ ], "infos" : [ ] } } ``` -------------------------------- ### Example JSON Error Response for Internal Critical Error Source: https://developer.avinodegroup.com/docs/error-handling-guide This JSON structure represents an internal critical error encountered by the server. It includes a detailed error message in the 'title' field and a specific error code 'ERR_INTERNAL_CRITICAL'. ```json { "meta": { "errors": [ { "title": "Unfortunately the application has experienced an error. Please try again later or contact us.", "code": "ERR_INTERNAL_CRITICAL" } ], "warnings": [], "infos": [] } } ``` -------------------------------- ### API Pagination Example Source: https://developer.avinodegroup.com/docs/extract-data-to-your-report-system Demonstrates how to paginate API responses to retrieve large datasets in manageable chunks. It shows the typical pagination structure in a JSON response and how to construct subsequent requests using page number and size parameters. This is crucial for efficient data synchronization. ```json { "pagination": { "totalCount": 709, "pageNumber": 0, "batchSize": 100 } } ``` ```json https://sandbox-schedaero.avinode.com/api/contacts/people/contact-12345/trips/quoted?page[number]=1&page[size]=100&fields[trip]=requester&fields[quote]=trip ``` -------------------------------- ### Create Partnership - Avinode API Source: https://developer.avinodegroup.com/docs/working-with-partnerships Creates a new partnership with specified display name and activation status. Optionally synchronizes the entire fleet of partner companies. Uses the POST /partnership endpoint. ```json { "displayName": "My Partnership", "active": true, "autoSyncFleet": true } ``` -------------------------------- ### Example JSON Error Response for Max Length Exceeded Source: https://developer.avinodegroup.com/docs/error-handling-guide This JSON snippet indicates an error where an input value exceeds the maximum allowed length. The error code 'ERR_INPUT_MAX_LENGTH' and the 'path' field specify which input caused the issue. ```json { "meta": { "errors": [ { "title": "The value exceeds the max length: 512", "code": "ERR_INPUT_MAX_LENGTH", "path": "activities[X].note" } ], "warnings": [], "infos": [] } } ``` -------------------------------- ### X-Avinode-Product Header Source: https://developer.avinodegroup.com/docs/api-basics Identifies the calling application and its version. This header should always be populated, even though omitting it may not cause an immediate error. ```APIDOC ## X-Avinode-Product Header ### Description This header parameter is required to identify the name and version of the application making the API request. It is essential for tracking and managing API integrations. ### Method Any HTTP Method ### Endpoint All Avinode API Endpoints ### Parameters #### Header Parameters - **X-Avinode-Product** (string) - Required - The name and version of the calling application (e.g., "My API App v1.0"). ### Request Example ```json X-Avinode-Product: Your API Application Name v1.0 ``` ### Response No specific response for this header. It is used for identification purposes. ``` -------------------------------- ### Example JSON Error Response for Constraint Violation (URL in use) Source: https://developer.avinodegroup.com/docs/error-handling-guide This JSON snippet demonstrates an error where a constraint violation occurs, specifically when a provided URL is already in use. The error code 'ERR_PERSIST_CONSTRAINT_VIOLATED' and the 'path' field highlight the problem. ```json { "meta": { "errors": [ { "title": "Field \"URL\" is invalid. The URL https://example.webhook.website.url/ is already in use in the system, please provide a unique URL to continue.", "code": "ERR_PERSIST_CONSTRAINT_VIOLATED", "status": 422, "path": "targetURI" } ], "warnings": [], "infos": [] } } ``` -------------------------------- ### GET /emptylegs/{emptyLegId} Source: https://developer.avinodegroup.com/docs/end-client-empty-leg-subscription Retrieves the details of a specific empty leg by its ID. Used to get updated information when a webhook notification is received. ```APIDOC ## GET /emptylegs/{emptyLegId} ### Description Retrieves detailed information about a specific empty leg using its unique ID. This is typically called in response to a webhook notification about an updated or removed empty leg. ### Method GET ### Endpoint /emptylegs/{emptyLegId} ### Parameters #### Path Parameters - **emptyLegId** (string) - Required - The ID of the empty leg. ### Response #### Success Response (200) - **id** (string) - The ID of the empty leg. - **departureTime** (string) - The departure time of the empty leg. - **fromAirport** (string) - The departure airport. - **toAirport** (string) - The destination airport. - **aircraftType** (string) - The type of aircraft. - **price** (number) - The price of the empty leg. - **status** (string) - The current status of the empty leg (e.g., "active", "removed"). #### Response Example ```json { "id": "el_12345", "departureTime": "2023-10-27T10:00:00Z", "fromAirport": "LHR", "toAirport": "JFK", "aircraftType": "777", "price": 50000, "status": "active" } ``` ``` -------------------------------- ### GET /tripmsgs/{id} Source: https://developer.avinodegroup.com/docs/avinode-webhooks Retrieves detailed trip message information for a specific message ID. This endpoint is called after consuming a notification to get the full message content. ```APIDOC ## GET /tripmsgs/{id} ### Description Retrieves detailed trip message information for a specific message ID. This endpoint is called after consuming a notification to get the full message content. ### Method GET ### Endpoint `/tripmsgs/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the trip message to retrieve. ### Response #### Success Response (200) - **messageContent** (string) - The content of the trip message. - **sender** (string) - The identifier of the sender. - **timestamp** (string) - The timestamp when the message was sent. #### Response Example ```json { "messageContent": "This is the message content.", "sender": "seller-123", "timestamp": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Webhook Notification Payload Example Source: https://developer.avinodegroup.com/docs/extract-data-to-your-report-system This is an example of a JSON payload that might be received from a webhook notification. It contains an ID, a hyperlink to the resource, and the type of resource that was updated. This ID is crucial for retrieving the actual updated information. ```json { "id": "schedaero-trip-12345678", "href": "https://schedaero.avinode.com/api/trips/schedaero-trip-12345678", "type": "schedaero-trip" } ``` -------------------------------- ### Client Leads Notification Example (JSON) Source: https://developer.avinodegroup.com/docs/avinode-webhooks This JSON object illustrates a notification for a new client lead generated through an Avinode Web App or a custom application. It contains a lead ID, a URL (href) to the lead resource, and the notification type. ```json { "id": "ecl-1000000017", "href": "https://sandbox.avinode.com/api/leads/ecl-1000000017", "type": "leads" } ``` -------------------------------- ### Create Partnership Source: https://developer.avinodegroup.com/docs/working-with-partnerships Use the POST /partnership endpoint to create a new partnership. You must provide a display name, and can optionally configure activation status and automatic fleet synchronization. ```APIDOC ## POST /partnership ### Description Creates a new partnership with a charter operator. ### Method POST ### Endpoint /partnership ### Parameters #### Request Body - **displayName** (string) - Required - The name of the partnership. - **active** (boolean) - Optional - Whether the partnership is active. Defaults to true. - **autoSyncFleet** (boolean) - Optional - Whether to automatically sync the entire fleet of partner companies. Defaults to true. ### Request Example ```json { "displayName": "My Partnership", "active": true, "autoSyncFleet": true } ``` ### Response #### Success Response (201 Created) - **partnershipId** (string) - The unique identifier for the newly created partnership. - **displayName** (string) - The name of the partnership. - **active** (boolean) - The active status of the partnership. - **autoSyncFleet** (boolean) - The auto-sync fleet status. #### Response Example ```json { "partnershipId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "displayName": "My Partnership", "active": true, "autoSyncFleet": true } ``` ``` -------------------------------- ### Trip Request (My Company) Notification Example (JSON) Source: https://developer.avinodegroup.com/docs/avinode-webhooks This JSON object is an example of a 'TripRequestMine' notification. It is sent when someone in your company sends or cancels a trip request. The 'href' points to the relevant RFQ information. ```json { "id": "arfq-1000000017", "href": "https://sandbox.avinode.com/api/rfqs/arfq-1000000017", "type": "rfqs", "tripId": "A1B2C3" } ``` -------------------------------- ### Webhook Notification Payload Example Source: https://developer.avinodegroup.com/docs/future-scheduled-flights-to-your-external-system This is an example of a JSON payload received from a webhook notification. It contains an ID, a hyperlink to the resource, and the type of the resource, indicating a specific trip has been updated or created. ```json { "id": "schedaero-trip-12345678", "href": "https://sandbox-schedaero.avinode.com/api/trips/schedaero-trip-12345678", "type": "schedaero-trip" } ``` -------------------------------- ### Identify Quote Source with GET /tripmsgs/{messageId} (JSON) Source: https://developer.avinodegroup.com/docs/download-respond-rfq Retrieve details about the quoting channel and integration software used for a trip message. Include `fields[quotes]=channel` to get the channel and softwarePartner information. The channel can be 'API' or 'DESKTOP'. ```json { "channel": { "softwarePartner": { "partnerId": "string", "partnerName": "string" } } } ``` -------------------------------- ### Avinode Deep Link Example: Search in Avinode Source: https://developer.avinodegroup.com/docs/working-with-deep-links This JSON response demonstrates how a deep link for searching within Avinode is returned for an RFQ. The 'searchInAvinode' action contains an 'href' that, when called, initiates a search with the RFQ's parameters and opens the Avinode web UI with the results. This functionality is part of the Avinode API. ```json GET https://sandbox.avinode.com/api/rfqs/arfq-68998748 { "meta": { "errors": [], "warnings": [], "infos": [] }, "data": { "id": "arfq-68998748", "href": "https://sandbox.avinode.com/api/rfqs/arfq-68998748", "type": "rfqs", "links": { "tripmsgs": [ { "id": "abuyermsg-69421520", "href": "https://sandbox.avinode.com/api/tripmsgs/abuyermsg-69421520", "type": "tripmsgs" } ] }, "actions": { "searchInAvinode": { "type": "searchInAvinode", "description": "Compare in Avinode", "httpMethod": "GET", "href": "https://sandbox.avinode.com/marketplace/mvc/search/load/arfq-68998748?source=api&origin=api_action" }, "viewInSchedAero": { "type": "viewInSchedAero", "description": "View in SchedAero", "httpMethod": "GET", "href": "https://sandbox-schedaero.avinode.com/mvc/trip/fromimportedavinoderfq/arfq-68998748?source=api" }, "book": { "type": "book", "description": "Book the trip", "httpMethod": "POST", "href": "https://sandbox.avinode.com/api/tripmsgs/arfq-68998748/book" }, "submitQuote": { "type": "submitQuote", "description": "Submit a quote", "httpMethod": "POST", "href": "https://sandbox.avinode.com/api/tripmsgs/arfq-68998748/submitQuote" }, "decline": { "type": "decline", "description": "Decline", "httpMethod": "POST", "href": "https://sandbox.avinode.com/api/tripmsgs/arfq-68998748/decline" }, "viewInAvinode": { "type": "viewInAvinode", "description": "View in Avinode", "httpMethod": "GET", "href": "https://sandbox.avinode.com/marketplace/mvc/trips/selling/rfq?source=api&rfq=arfq-68998748" } } } } ``` -------------------------------- ### Webhook Notifications Source: https://developer.avinodegroup.com/docs/search-in-avinode-from-your-system Set up webhooks to receive timely notifications about relevant changes in Avinode. Key events include seller responses, internal trip requests, and chat messages. ```APIDOC ## Webhook Notifications ### Description Configure webhooks to receive real-time updates from Avinode for various events. ### Supported Events - **TripRequestSellerResponse**: Notifies when a seller responds to a trip request. - **TripRequestMine**: Notifies when a trip request or cancellation is made within your company. - **TripChatSeller**: Notifies of chat messages from sellers regarding a trip. - **TripChatMine**: Notifies when someone in your company chats on a trip. ### Setup Refer to the Avinode developer documentation for details on creating webhook settings: [Create webhook settings](https://developer.avinodegroup.com/reference/createsettings) ``` -------------------------------- ### Accept-Encoding Header for Compression Source: https://developer.avinodegroup.com/docs/api-basics Suggests using GZIP compression via the Accept-Encoding header to optimize response times, particularly for data-intensive requests like aircraft searches. ```APIDOC ## Accept-Encoding Header ### Description This header can be used to request GZIP compression for API responses. Enabling compression can significantly improve data transfer speeds, especially for large responses such as those from the aircraft search API when requesting extensive additional data. ### Method Any HTTP Method ### Endpoint All Avinode API Endpoints ### Parameters #### Header Parameters - **Accept-Encoding** (string) - Optional - Specifies the content encoding to prefer. Use 'gzip' for compression. ### Request Example ```json Accept-Encoding: gzip ``` ### Response If the server supports GZIP and the client requests it, the response body will be compressed using GZIP. The `Content-Encoding: gzip` header will be present in the response. ``` -------------------------------- ### Initial Empty Leg Fetch Source: https://developer.avinodegroup.com/docs/end-client-empty-leg-subscription Fetches all currently available empty legs matching the watchlist, intended for a single initial call. ```APIDOC ## GET /emptylegs/watches/{watchId}/getall ### Description Retrieves all currently available empty legs that match the specified watchlist. This call should only be made once during initial setup. ### Method GET ### Endpoint `/emptylegs/watches/{watchId}/getall` ### Parameters #### Path Parameters - **watchId** (string) - Required - The ID of the Empty Leg watchlist. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - An array of Empty Leg objects matching the watchlist criteria. ``` -------------------------------- ### Trip Chat (My Company) Notification Examples (JSON) Source: https://developer.avinodegroup.com/docs/avinode-webhooks These JSON examples show notifications for 'TripChatMine' events, triggered when someone in your company chats on a trip. Multiple message IDs and hrefs can be associated with this notification type. ```json { "id": "asellermsg-1000000008", "href": "https://sandbox.avinode.com/api/tripmsgs/asellermsg-1000000008", "type": "tripmsgs" } or { "id": "abuyermsg-1000000023", "href": "https://sandbox.avinode.com/api/tripmsgs/abuyermsg-1000000023", "type": "tripmsgs" } ``` -------------------------------- ### Decline Request Payload Example Source: https://developer.avinodegroup.com/docs/download-respond-rfq This JSON payload demonstrates how to specify a reason for declining a quote, either for a specific lift or the entire RFQ. It includes an optional `message` field for additional details and a `declineReason` field from a predefined list. ```json { "message": "The aircraft owner didn't approve the charter.", "declineReason": "OWNER_DECLINED" } ```