Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sv translation
languageen

Returns the status messages of orders.

Description

Status
colourGreen
titleGET
 order_management/get_orderstate.php?company=RTI_COMPANYKEY&import=RTI_IMPORTKEY&start=YYYYMMDDHHMMSS&end=YYYYMMDDHHMMSS

Parameters

parameter

description

type

hint

mandatory

companyRTI company keystring
yes
vehicleRTI vehicle keystringeither vehicle, group or import parameter(yes)
group

RTI vehicle group key (all vehicles of a group)

stringeither vehicle, group or import parameter(yes)
import

RTI import key (all vehicles)

stringeither vehicle, group or import parameter(yes)
customorderiduser-defined order numberstringeither set this field or start and end(yes)*1
startdate from which to return order statesstringFormat: YYYYMMDDHHMMSS(yes)*1
enddate to which to return order statesstringFormat: YYYYMMDDHHMMSS
The maximum time span is 7 days.
(yes)*1
datetypetype of date to be used for date restrictionstring

Possible values:

  • gps (default)
  • insert
no
formatoutput formatstring

Possible values:

  • csv (default)
  • json
no

*1 mandatory is either customorderid or ( start and end )

Return value

A string will be returned. On error you will receive "ERROR:description".


CSV format

First line is the header with field names. We use a double quote as text delimiter.

Meta information

separatorcomma ( , )
text delimiterdouble quote ( " )
line end0x0D 0x0A (CarriageReturn LineFeed)
headerline 1

Column description

column

description


CUSTORDERIDuser-defined order number
DATEdate of pressed stateDD.MM.YYYY HH:MM:SS
STATEstate text which was pressed
SOURCETYPEtype of sourcePND (if vehicle or RTI) or PORTAL
SOURCEwho triggered this actionperson/system name
STATE_IDENTuser-defined ident of state if given
STATE_LANGcountry code, if the state was pressed in another language than german
STATE_TRANStranslated state text, if the state was pressed in another language than german
METAmeta info
REQUESTDATErequest date
RTI_IDENTRTI ident of vehicle

Example

Code Block
"CUSTORDERID","DATE","STATE","SOURCETYPE","SOURCE","STATE_IDENT","STATE_LANG","STATE_TRANS","META","REQUESTDATE","RTI_IDENT"
"Auftrag 123","18.07.2022 09:43:42","Zustellungsversuch","PORTAL","FTL YF 123","","","","","21.07.2022 06:38:50","rti123"


JSON format

Example

Code Block
[
    {
        "gpsdate": "18.07.2022 09:43:42",
        "requestdate": "21.07.2022 06:43:45",
        "custom_order_id": "Auftrag 123",
        "state": "Zustellungsversuch",
        "state_trans": null,
        "state_lang": null,
        "state_ident": null,
        "meta": null,
        "source_type": "PORTAL",
        "source": "FTL YF 123",
        "rti_ident": "rti123"
    }
]


Possible error values

error

description

MISSING_COMPANYcompany key is missing
INVALID_COMPANYCompany not found. Migth be due to faulty company or import key.
ERROR_MAINTENANCEYour company is under maintenance, at the moment no requests are possible.
INVALID_KEY(VEHICLE|GROUP|IMPORT)The given RTI key does not match the expected structure.
NO_KEY_GIVEN(VEHICLE|GROUP|IMPORT)No RTI key to identify any vehicles was given.
INVALID_VEHICLE_KEY / INVALID_GROUP_KEYNo vehicles which match the RTI keys were found.
ERROR_MISSING_CUSTORDERID|DATEFROM|DATETOYou have to set either a custom order id or start and end for a valid request,
ERROR_INVALID_DATEFROMYou have entered a start date, which does not match the needed format.
ERROR_INVALID_DATETOYou have entered an end date, which does not match the needed format.
ERROR_INVALID_DATERANGEYour start and end date are either more than 7 days apart or your end date is before your start date.
ERROR_INVALID_FORMATYou have entered an unknown output format.
ERROR_INVALID_DATE_TYPEYou have entered an unknown date type.
ERROR_ORDER_NOT_FOUNDSearch via custom order id: No order with given order number was found.
ERROR_DUPLICATE_CUSTOMORDERIDSearch via custom order id: Multiple orders with given order number were found. This function can only be used to gather states for orders which unique identifiers.

Example call

JSON

Code Block
https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle=VEHICLE_KEY&customorderid=Auftrag 123&format=json

https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&customorderid=Auftrag 123&format=json  


CSV

Code Block
https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle=VEHICLE_KEY&start=20220501000000&end=20220508000000&format=csv

https://map.yellowfox.de/rti/order_management/get_orderstate.php?company=COMPANY_KEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&start=20220501000000&end=20220508000000&format=csv