0

I'm lost and I'm hoping that someone may have worked on this before. So Coupa has its API: https://coupadocs.atlassian.net/wiki/display/integrate/Users+API

I was able to retrieve user information together with the corresponding manager. Sample response:

https://unknownserver-test.coupahost.com/api/users?employee-number=10003323

[
  {
    "id": 2756,
    "created-at": "2017-03-30T09:29:19-05:00",
    "updated-at": "2017-03-31T04:30:53-05:00",
    "login": "user1.user1",
    "email": "staging23@coupa.com",
    "purchasing-user": false,
    "expense-user": false,
    "sourcing-user": false,
    "inventory-user": false,
    "employee-number": "10003323",
    "phone-work": null,
    "phone-mobile": null,
    "firstname": "user1",
    "lastname": "user1",
    "fullname": "user1 user1",
    "api-user": false,
    "active": false,
    "salesforce-id": null,
    "account-security-type": 0,
    "authentication-method": "coupa_credentials",
    "sso-identifier": null,
    "default-locale": null,
    "default-account": null,
    "business-group-security-type": null,
    "edit-invoice-on-quick-entry": false,
    "avatar-thumb-url": null,
    "mention-name": "user1user1",
    "company-employee-id": "10003323",
    "netsuite-employee-id": "10003323",
    "subsidiary": {
      "id": 1592,
      "external-ref-num": null,
      "external-ref-code": "company North America:1"
    },
    "job-title": {
      "id": 2591,
      "external-ref-num": null,
      "external-ref-code": "VP, Sales"
    },
    "employee-type": "",
    "default-expense-region": "",
    "default-geo-spend": "",
    "notes": "",
    "exclude-from-autosarf": "",
    "roles": [
      {
        "id": 10,
        "name": "Expense User"
      }
    ],
    "manager": {
      "id": 838,
      "login": "john.doe",
      "email": "staging@coupa.com"
    },
    "default-currency": {
      "id": 1,
      "code": "USD"
    },
    "department": {
      "id": 342,
      "name": "Sales - Exec:176"
    },
    "expenses-delegated-to": [],
    "can-expense-for": [],
    "content-groups": [],
    "account-groups": [],
    "approval-groups": [],
    "working-warehouses": [],
    "inventory-organizations": [],
    "created-by": {
      "id": 2748,
      "login": "user1 creator",
      "email": "user1.creator@company.com"
    },
    "updated-by": {
      "id": 2748,
      "login": "user1 creator",
      "email": "user1.creator@company.com"
    }
  }
]  

What I've tried are these:

https://unknownserver-test.coupahost.com/api/users?user[manager][id]=838&return_object=shallow
https://unknownserver-test.coupahost.com/api/users?manager[id]=838&return_object=shallow
https://unknownserver-test.coupahost.com/api/users?users[user][manager][id]=838&return_object=shallow
fiberOptics
  • 6,955
  • 25
  • 70
  • 105

1 Answers1

0
https://{{URL PREFIX}}.{{HOST}}.com/api/users?manager_id=838&return_object=shallow

If you only need the IDs of the users, you'd get better performance with return_object=limited

If there are more than 50 users returned, you'll have to paginate with the offset query param.

creativecreatorormaybenot
  • 114,516
  • 58
  • 291
  • 402