403 code for List payroll events by legal entity

Hi team,

I’m trying to integrate with the Deel API but I keep getting a 403 Forbidden response. My request looks like this:

  • Endpoint: legal-entities/{id}/reports

  • Method: GET

  • Headers: I’m including the Authorization: Bearer <token> header with a valid token.

  • Environment: I’ve tried api.letsdeel.com

  • Scope: I have taken a token with full scopes/access.

  • I have also provide curl for the same

  • curl --request GET \
         --url https://api.letsdeel.com/rest/v2/gp/legal-entities/{id}/reports \
         --header 'accept: application/json' \
         --header 'authorization: Bearer {bearer token}'
    
  • Response: {
      "request": {
        "method": "GET",
        "url": "/legal_entities/{uuid/payroll_events",
        "status": 403,
        "api_req_id": "{uuid}",
        "docs": "no match",
        "source": "http"
      },
      "errors": {
        "request": {
          "method": "GET",
          "url": "/legal_entities/{uuid}/payroll_events",
          "status": 403,
          "api_req_id": "{uuid}",
          "docs": "no match",
          "source": "http"
        },
        "errors": "Access Denied"
      }
    }
    
  • I am fetching id from List of legal entities endpoint

  • curl --request GET \
         --url 'https://api.letsdeel.com/rest/v2/legal-entities?limit=100&sort_order=ASC&include_archived=true' \
         --header 'accept: application/json' \
         --header 'authorization: Bearer {bearer token}'
    

    Even though my token works for authentication (status 200 on login), calling the API endpoint for this returns a 403.

Could you please clarify:

  1. Are there additional permissions/scopes required for this endpoint?

  2. Is this API available in sandbox, or only in production?

  3. Are there IP restrictions or other security rules I should be aware of?

Thanks in advance!

Hello @Deepak_05082002,

Can you kindly clarify if you are using our API Sandbox or production? All our APIs have the API Sandbox version, with the following demo url https://api-sandbox.demo.deel.com/

  1. If you have the token for all scopes, you should be covered, have you added any PII or salary information restrictions during your token creation?
  2. All APIs are available in both environments
  3. Only if you add PII or salary restrictions to your token

Keen to hear back from you,
Gabriela