Přeskočit na hlavní obsah
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

PlatformStore.Order API endpoints

PlatformStore.Order API base URL: https://{hostname}/api/asol/ord
Swagger UI: https://demo.avaplace.com/api/asol/ord/swagger

See also:

Get a collection of orders in descending order (the newest order first)

GET /api/v1/Order

API call example - Click to expand

Query parameters:

  • orderAccessType - (mandatory) the type of perspective applied to filter orders for current tenant
    • Vendor => the released orders of applications provided by partner
  • includeTestingOrders - the filter to include testing orders (optional, default: false)
  • offset + limit - the client paging parameters (default values: offset = 0 and limit = 100)

Url examples:

  • https://demo.avaplace.com/api/asol/ord/api/v1/Order?orderAccessType=Vendor&includeTestingOrders=true
  • https://avaplace.com/api/asol/ord/api/v1/Order?orderAccessType=Vendor

Sample response (shortened):

{
"totalCount": 5,
"items": [
{
"id": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"orderNumber": "202305090001",
"licenceId": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"licenceCode": "B8240B7C-3040-500F-82F8-052E6FDE6E8C",
"vendor": {
"code": "64949541|CZ"
},
...
},
...
]
}

Get the order detail using the order number

GET /api/v1/Order/OrderNumber/{orderNumber}

API call example - Click to expand

Query parameters:

  • orderNumber - (mandatory) the order number
  • orderAccessType - (mandatory) the type of perspective applied to filter orders for current tenant
    • Vendor => the released orders of applications provided by partner

Url examples:

  • https://demo.avaplace.com/api/asol/ord/api/v1/Order/OrderNumber/202305090001?orderAccessType=Vendor

Sample response (shortened):

{
"id": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"orderNumber": "202305090001",
"licenceId": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"licenceCode": "B8240B7C-3040-500F-82F8-052E6FDE6E8C",
"vendor": {
"code": "64949541|CZ"
},
...
}

Get the order detail using the order identifier

GET /api/v1/Order/{id}

API call example - Click to expand

Query parameters:

  • id - (mandatory) the order identifier
  • orderAccessType - the type of perspective applied to filter orders for current tenant (mandatory)
    • Vendor => the released orders of applications provided by partner

Url examples:

  • https://demo.avaplace.com/api/asol/ord/api/v1/Order/b8240b7c-3040-500f-82f8-052e6fde6e8c?orderAccessType=Vendor

Sample response (shortened):

{
"id": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"orderNumber": "202305090001",
"licenceId": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"licenceCode": "B8240B7C-3040-500F-82F8-052E6FDE6E8C",
"vendor": {
"code": "64949541|CZ"
},
...
}

Get a collection of order statuses using the order identifier (the newest status first)

GET /api/v1/Order/{id}/Status

API call example - Click to expand

Query parameters:

  • id - (mandatory) the order identifier
  • orderAccessType - the type of perspective applied to filter orders for current tenant (mandatory)
    • Vendor => the released orders of applications provided by partner
  • includeLogs - the filter to include informative items (optional, default: false)
  • offset + limit - the client paging parameters (default values: offset = 0 and limit = 100)

Url examples:

  • https://demo.avaplace.com/api/asol/ord/api/v1/Order/b8240b7c-3040-500f-82f8-052e6fde6e8c/Status?orderAccessType=Vendor&includeLogs=true
  • https://avaplace.com/api/asol/ord/api/v1/Order/b8240b7c-3040-500f-82f8-052e6fde6e8c/Status?orderAccessType=Vendor

Sample response (shortened):

{
"totalCount": 3,
"items": [
{
"orderId": "b8240b7c-3040-500f-82f8-052e6fde6e8c",
"createdOn": "2023-05-09T06:17:11.889Z",
"systemStatus": "Done",
"severity": "Info",
"source": "BypassOrderStatusFlow",
"message": "Auto",
"details": [],
"customProperties": []
},
...
]
}

Set the new status of order using the order identifier

POST /api/v1/Order/{id}/SetStatus

API call example - Click to expand

Query parameters:

  • id - (mandatory) the order identifier
  • orderAccessType - the type of perspective applied to filter orders for current tenant (mandatory)
    • Vendor => the released orders of applications provided by partner

Request body properties:

  • systemStatus - (optional) the new system status value (mandatory when requested to change system status in the state machine)
  • severity - the severity of status information (info, warning, error = technical failure)
  • statusCode - the informative code of external operation (e.g. rest api call result)
  • source - the informative code of source application (e.g. agent code) calling set status
  • message - (mandatory) the user message
  • details - (optional) the array of technical details (e.g. details about technical failure)
  • customProperties - (optional) the collection of key/value pairs

Url examples:

  • https://demo.avaplace.com/api/asol/ord/api/v1/Order/b8240b7c-3040-500f-82f8-052e6fde6e8c/SetStatus?orderAccessType=Vendor

Sample request body:

{
"systemStatus": "Validation",
"severity": "Info",
"statusCode": 0,
"source": "My.OrderExternalAgent",
"message": "OK",
"details": [
"nothing", "important"
],
"customProperties": [
{
"key": "ApplicationUrl",
"value": "https://myuser.myapp.com"
}
]
}

Sample response:

{
"id": "b3d6cd2d-4a49-44d7-b721-ad69063d0818"
}

PlatformStore.Order events

This event can be consumed via messaging, see 1st method of communication - Message Publisher / Consumer.

ASOL.PlatformStore.OrderReleased (default queue)

Message notifies that application order has been created and released by customer.

Parameters - Click to expand

Event definitions:

  • messageType: ASOL.PlatformStore.OrderReleased
  • contractType: OrderReleased
  • exchange: ASOL.PlatformStore.Orders.Contracts.Events:OrderReleased
  • queueName: `` (i.e. default queue)

Event headers:

  • X-VendorCode - the owner organization code of partner/vendor (i.e. mandant code)
  • X-Tenant-Id - the tenant identifier of customer

Event classes:

  • ASOL.PlatformStore.Orders.Contracts.Events.OrderReleased

Event properties:

  • orderId - the order identifier (guid)
  • productId - the product identifier (guid)
  • vendorCode - the owner organization code of partner/vendor, e.g. "64949541|CZ"