Skip to main content
PUT
/
data
/
{_id}
Update data source by ID
curl --request PUT \
  --url https://apiweb.mile.app/api/v3/data/{_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dataId": "OutletAdi",
  "dataTypeId": "63f854cff2bd7b342a098962",
  "hubId": "63c63ab1b6972d3150348172",
  "outletName": "Cabang Jakarta Pusat",
  "outletHours": 12,
  "outletType": "minimarket",
  "outletOpen": "09:00",
  "outletClose": "17:00",
  "outletContractExpired": "2023-02-02",
  "outletOpenInWeekend": true,
  "outletGeolocation": "-6.171702325136309,106.81775093078615",
  "outletPhoneNumber": "+62 123 456 789",
  "outletCloseOrder": "2023-02-02 17:00:00"
}
'
{
  "status": true,
  "message": "Success",
  "data": {
    "_id": "63dc641b1ed1fd63ad0c9013",
    "dataId": "Outlet",
    "dataTypeId": "63db2fb476bc679c540369c4",
    "outletName": "Cabang Jakarta Pusat",
    "outletHours": 12,
    "outletType": "minimarket",
    "outletOpen": "09:00",
    "outletClosed": "17:00",
    "outletContractExpired": "2023-02-02",
    "outletOpenInWeekend": true,
    "outletGeolocation": "-6.171702325136309,106.81775093078615",
    "outletPhoneNumber": "+62 123 456 789",
    "outletCloseOrder": "2023-02-02 17:00:00",
    "hubId": "63c63ab1b6972d3150348172",
    "organizationId": "63c61d865347e356d05e3052",
    "createdBy": "john.doe@mile.app",
    "updatedTime": "2023-02-03 01:32:11",
    "createdTime": "2023-02-03 01:32:11"
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Path Parameters

_id
string
required

Unique identifier for the data that generated by system. Example: 63dc641b1ed1fd63ad0c9013

Body

application/json
dataId
string
required

The identifier of fields from data type. Example: Outlet

dataTypeId
string
required

The identifier of data type. Use GET /data-types API to get the list of Data Type IDs. Example: 63db2fb476bc679c540369c4

hubId
string

The identifier for the hub that generated by system. hubId is not required if the commonData configuration for the data type is true. Use GET /hubs API to get the list of Hub IDs. Example: 63c63ffbdef63e6f641aac72

outletName
string

The dynamic field, outlet name. Use GET /data-types API to get detail fields of data source. Example: Cabang Jakarta Pusat

outletHours
integer

The dynamic field, outlet hours. Use GET /data-types API to get detail fields of data source. Example: 12

outletType
string

The dynamic field, outlet type. Use GET /data-types API to get detail fields of data source. Example: minimarket

outletOpen
string

The dynamic field, outlet open. Use GET /data-types API to get detail fields of data source. Example: 09:00

outletClosed
string

The dynamic field, outlet closed. Use GET /data-types API to get detail fields of data source. Example: 17:00

outletContractExpired
string

The dynamic field, outlet contract expired. Use GET /data-types API to get detail fields of data source. Example: 2023-02-02

outletOpenInWeekend
boolean

The dynamic field, outlet open in weekend. Use GET /data-types API to get detail fields of data source. Example: true

outletGeolocation
string

The dynamic field, outlet geolocation. Use GET /data-types API to get detail fields of data source. Example: -6.171702325136309,106.81775093078615

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

data
object

Detail of object data source.