Update Expense Codes (BULK)


PUT /v2/api/corporate/expenseCode/bulk

Use this Api to update expense codes in bulk.


Request Parameters

Name Data Type Description Type Remark
expense_code string Expense Code Name Payload Mandatory
capping map

Capping

  • start_time (Date), format:"dd-MM-yyyy hh:mm:ss"
  • end_time (Date), should be greater than start_date and same format
  • ride_cap (Integer), Should be > 0
Payload Optional
scopes list of objects

Scopes

  • expense_code_creation_level (string), values are case sensitive and allowed - { CORPORATE/GROUP/EMPLOYEE }, Mandatory
  • expense_code_created_for (string), Mandatory for GROUP and EMPLOYEE
Payload Mandatory
  • Example Request

    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
        }
    
    

    Example Response (Success)

    
        {
          "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": []
            }
          ]
        }