@api = http://localhost:5000 @accessToken = xxx.xxx.xxx @customerId = 00000000-0000-0000-0000-000000000000 @operationId = 00000000-0000-0000-0000-000000000000 @parcelId = 00000000-0000-0000-0000-000000000000 @orderId = 00000000-0000-0000-0000-000000000000 @vehicleId = 00000000-0000-0000-0000-000000000000 @resourceId = 00000000-0000-0000-0000-000000000000 @deliveryId = 00000000-0000-0000-0000-000000000000 @dateTime = 2020-01-10 @deliveryDate = 2020-01-10 @orderPrice = 100 @state = valid @tags = ["vehicle", "armor"]
# ============== IDENTITY ==================== #
### POST sign-up POST {{api}}/identity/sign-up Content-Type: application/json
- {
- "email": "[email protected]", "password": "secret", "role": "admin"
}
### POST sign-in POST {{api}}/identity/sign-in Content-Type: application/json
- {
- "email": "[email protected]", "password": "secret"
}
### GET me GET {{api}}/identity/me Authorization: Bearer {{accessToken}}
# ============== CUSTOMERS ==================== #
### GET {{api}}/customers Authorization: Bearer {{accessToken}}
### GET {{api}}/customers/me Authorization: Bearer {{accessToken}}
### GET {{api}}/customers/{{customerId}} Authorization: Bearer {{accessToken}}
### GET {{api}}/customers/{{customerId}}/state Authorization: Bearer {{accessToken}}
### POST {{api}}/customers Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "fullName": "John Doe", "address": "New York"
}
### PUT {{api}}/customers/{{customerId}}/state/{{state}} Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "customerId": "{{customerId}}", "state": "{{state}}"
}
# ============== AVAILABILITY ==================== #
### GET {{api}}/availability/resources?tags={{tags}}&matchAllTags=false
### GET {{api}}/availability/resources/{{resourceId}} Authorization: Bearer {{accessToken}}
### POST {{api}}/availability/resources Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "resourceId": "{{resourceId}}", "tags": {{tags}}
}
### POST {{api}}/availability/resources/{{resourceId}}/reservations/{{dateTime}} Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "resourceId": "{{resourceId}}", "customerId": "{{customerId}}", "dateTime": "{{dateTime}}", "priority": 0
}
### DELETE {{api}}/availability/resources/{{resourceId}}/reservations/{{dateTime}} Authorization: Bearer {{accessToken}}
### DELETE {{api}}/availability/resources/{{resourceId}} Authorization: Bearer {{accessToken}}
# ============== DELIVERIES ==================== #
### GET {{api}}/deliveries/{{orderId}} Authorization: Bearer {{accessToken}}
### POST {{api}}/deliveries Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "orderId": "{{orderId}}", "description": "Delivery description", "dateTime": "2019-10-10"
}
### POST {{api}}/deliveries/{{deliveryId}}/fail Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "id": "{{deliveryId}}", "reason": "Delivery failed"
}
### POST {{api}}/deliveries/{{deliveryId}}/complete Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "id": "{{deliveryId}}"
}
### POST {{api}}/deliveries/{{deliveryId}}/registrations Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "id": "{{deliveryId}}", "description": "Delivery registration description", "dateTime": "2019-10-10"
}
# ============== OPERATIONS ==================== #
### GET {{api}}/operations/{{operationId}}
# ============== ORDERS ==================== #
### GET {{api}}/orders Authorization: Bearer {{accessToken}}
### GET {{api}}/orders/{{orderId}} Authorization: Bearer {{accessToken}}
### POST {{api}}/orders Authorization: Bearer {{accessToken}} Content-Type: application/json
### DELETE {{api}}/orders/{{orderId}} Authorization: Bearer {{accessToken}}
### POST {{api}}/orders/{{orderId}}/parcels/{{parcelId}} Authorization: Bearer {{accessToken}} Content-Type: application/json
### POST {{api}}/orders/{{orderId}}/vehicles/{{vehicleId}} Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "deliveryDate": "{{deliveryDate}}"
}
### DELETE {{api}}/orders/{{orderId}}/parcels/{{parcelId}} AuthorizatiOrderDiscountPriceon: Bearer {{accessToken}}
# ============== PARCELS ==================== #
### GET {{api}}/parcels Authorization: Bearer {{accessToken}}
### GET {{api}}/parcels/{{parcelId}} Authorization: Bearer {{accessToken}}
### GET {{api}}/parcels/volume?parcelIds=["{{parcelId}}"] Authorization: Bearer {{accessToken}}
### POST {{api}}/parcels Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "variant": "weapon", "size": "large", "name": "Parcel #1", "description": "My parcel #1"
}
### DELETE {{api}}/parcels/{{parcelId}} Authorization: Bearer {{accessToken}}
# ============== PRICING ==================== #
### GET {{api}}/pricing?orderPrice={{orderPrice}} Authorization: Bearer {{accessToken}}
# ============== VEHICLES ==================== #
### GET {{api}}/vehicles?payloadCapacity=0&loadingCapacity=0&variants=1 Authorization: Bearer {{accessToken}}
### GET {{api}}/vehicles/{{vehicleId}} Authorization: Bearer {{accessToken}}
### POST {{api}}/vehicles Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "brand": "Brand", "model": "Model", "description": "Vehicle description", "payloadCapacity": 1000, "loadingCapacity": 1000, "pricePerService": 100, "variants": 1
}
### PUT {{api}}/vehicles/{{vehicleId}} Authorization: Bearer {{accessToken}} Content-Type: application/json
- {
- "id": "{{vehicleId}}", "description": "Updated vehicle description", "pricePerService": 150, "variants": 2
}
### DELETE {{api}}/vehicles/{{vehicleId}}