-
-
Save matthewpoer/87b39b0339f3b4a346fff51a2076839c to your computer and use it in GitHub Desktop.
Examples to aide in describing API errors in a forum post @ https://community.expensify.com/discussion/4321/incorrect-unclear-documentation-for-reportfields-data-values-in-policy-updater/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \ | |
-d 'requestJobDescription={ | |
"type": "update", | |
"credentials": { | |
"partnerUserID": "[redacted]", | |
"partnerUserSecret": "[redacted]" | |
}, | |
"inputSettings": { | |
"type": "policy", | |
"policyID": "[redacted]" | |
}, | |
"reportFields": { | |
"action": "merge", | |
"data": [ | |
{ | |
"name": "Report field 1", | |
"type": "dropdown", | |
"values": [ | |
{ | |
"value": "value 1", | |
"externalID": "1" | |
}, | |
{ | |
"value": "value 2", | |
"enabled": false | |
}, | |
{ | |
"value": "value 3", | |
"externalID": "3", | |
enabled: true | |
} | |
] | |
} | |
] | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \ | |
-d 'requestJobDescription={ | |
"type": "update", | |
"credentials": { | |
"partnerUserID": "[redacted]", | |
"partnerUserSecret": "[redacted]" | |
}, | |
"inputSettings": { | |
"type": "policy", | |
"policyID": "[redacted]" | |
}, | |
"reportFields": { | |
"action": "merge", | |
"data": [ | |
{ | |
"name": "Report field 1", | |
"type": "dropdown", | |
"values": [ | |
{ | |
"value": "value 1", | |
"externalID": "1" | |
}, | |
{ | |
"value": "value 2", | |
"enabled": false | |
}, | |
{ | |
"value": "value 3", | |
"externalID": "3", | |
enabled: true | |
} | |
] | |
} | |
] | |
} | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \ | |
-d 'requestJobDescription={ | |
"type": "update", | |
"credentials": { | |
"partnerUserID": "[redacted]", | |
"partnerUserSecret": "[redacted]" | |
}, | |
"inputSettings": { | |
"type": "policy", | |
"policyID": "[redacted]" | |
}, | |
"reportFields": { | |
"action": "merge", | |
"data": [ | |
{ | |
"name": "My New Field One", | |
"type": "dropdown", | |
"values": [ | |
"New Field One Option One", | |
"New Field One Option Two", | |
"New Field One Option Three" | |
] | |
}, | |
{ | |
"name": "My New Field Two", | |
"type": "dropdown", | |
"values": [ | |
"New Field Two Option One", | |
"New Field Two Option Two", | |
"New Field Two Option Three" | |
] | |
}, | |
] | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment