Files
Delete a customer upload
Deletes a file that the authenticated customer uploaded. The order must still allow changes.
DELETE
/
v2
/
orders
/
{order_id}
/
files
/
{file_id}
Delete a customer upload
curl --request DELETE \
--url https://sandbox.api.bahnexpress.fi/v2/orders/{order_id}/files/{file_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.bahnexpress.fi/v2/orders/{order_id}/files/{file_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.bahnexpress.fi/v2/orders/{order_id}/files/{file_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
OAuth 2.0 client credentials.
Headers
A caller-supplied request identifier for support.
Required string length:
1 - 255Path Parameters
The order identifier. Stable Bahn order identifier used in every order resource path.
Pattern:
^ord_[a-z0-9]+$File to delete from this order. Stable identifier for an uploaded or published order file.
Pattern:
^file_[a-z0-9]+$Response
The file is deleted.
⌘I
Delete a customer upload
curl --request DELETE \
--url https://sandbox.api.bahnexpress.fi/v2/orders/{order_id}/files/{file_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.bahnexpress.fi/v2/orders/{order_id}/files/{file_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.bahnexpress.fi/v2/orders/{order_id}/files/{file_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}