PUT
/v2/api/corporate/expenseCode/bulk
Use this Api to update expense codes in bulk.
Name | Data Type | Description | Type | Remark |
---|---|---|---|---|
expense_code | string | Expense Code Name | Payload | Mandatory |
capping | map |
Capping
|
Payload | Optional |
scopes | list of objects |
Scopes
|
Payload | Mandatory |
PUT
https://devapi.olacabs.com/v2/api/corporate/expenseCode/bulk
[
{
"expense_code": "MyExpenseCode1",
"capping": {
"start_time": "08-01-2017 00:09:11",
"end_time": "12-01-2018 00:19:00",
"ride_cap": 10
}
},
{
"expense_code": "MyExpenseCode2",
"capping": {
"start_time": "08-01-2017 00:09:11",
"end_time": "12-01-2018 00:19:00",
"ride_cap": 100
}
}
]
Headers: {
X-CORPORATE-TOKEN: fd5d4d3726121212f12ff12f12f1f12f1f12fa
}
{
"successful_expense_codes": 2,
"failed_expense_codes": 0,
"expense_code_responses": [
{
"expense_code": "MyExpenseCode1",
"expense_code_created": true,
"successful_scopes": 0,
"failed_scopes": 0,
"expense_code_message": "expense code updated successfully, use PATCH method\nif u wish to update the affiliated scopes",
"expense_code_scope_error_dtos": []
},
{
"expense_code": "MyExpenseCode2",
"expense_code_created": true,
"successful_scopes": 0,
"failed_scopes": 0,
"expense_code_message": "expense code updated successfully, use PATCH method\nif u wish to update the affiliated scopes",
"expense_code_scope_error_dtos": []
}
]
}