Developer Forum Equinix Customer Portal APIs Work Visit API - issue EQX-161-403Closed
 The Developer Forum is shutting down. Please join the Equinix Community to participate in new discussions.
SL
API User
Friday, October 30, 2020 - 13:00

Need help! 

I tried to use API and create a POST REST API request to raise a Work Visit request to Equinix. but unfortunately returned the EQX-161-403 errors. Please kindly help, no idea what this error message means and how to fix this error.

 

$workvisit = invoke-restmethod -uri "https://api.equinix.com/v1/orders/workvisit" -method POST -Headers $postParams -body $postParamsWVJson -ContentType "application/json"

invoke-restmethod : {"errors":[{"code":"EQX-161-403","message":"Contacts (with userName) should be Active and Approved"}],"ticketId":"201030030XXXXXX"}

 

<<< More details of my Power Shell Script >>>

$postParams = @{}

$postParams.Authorization="Bearer " + $token.access_token

$location = invoke-restmethod -uri "https://api.equinix.com/v1/orders/workvisit/locations" -method GET -Headers $postParams -ContentType "application/json"

$location2= invoke-restmethod -uri "https://api.equinix.com/v1/retrieve-orders/locations"  -method GET -Headers $postParams -ContentType "application/json"

 

 

$postParamsWV = `

@{"contacts" = 

    @(

    @{"contactType"="ORDERING";

       "userName" = "XXXX@YYY.com"};

    @{"contactType"="NOTIFICATION";

       "userName" = "XXXX@YYY.com"};

    );

 

  "ibxLocation"=

    @{"ibx" = "SAMPLE";

      "cages"=

        @(

        @{"cage"="SAMPLE:00:000000";

          "accountNumber" = "SAMPLE NUMBER"}

      )};

 

 

   "serviceDetails" =

        @{schedule =

            @{startDateTime = "2020-05-10T01:00:00Z";

              endDateTime = "2020-05-11T02:00:00Z"

            };

     

          "visitors" =@(@{"firstName" = "John";

                      "lastName" = "Doe";

                      "company" = "NN Test";

                      "email" = "John.Doe@Test.com";

                      "mobilePhoneCountryCode" = "+81";

                      "mobilePhone" = "80-1111-2222";};

                    @{ "userName" = "DDDD@yahoo.com"}

          );

          escortRequired = $false;

          openCabinet = $false;

    }

}

$postParamsWVJson = $postParamsWV|convertto-json -depth 100

$workvisit = invoke-restmethod -uri "https://api.equinix.com/v1/orders/workvisit" -method POST -Headers $postParams -body $postParamsWVJson -ContentType "application/json"

 

Regards,
Alan

PK
API User
Friday, October 30, 2020 - 14:45

Hello Alan,

As you're getting an EQX-161-403, could you please check if you're passing the correct username for your ordering and notification contact? 

In this case,  XXXX@YYY.com must match the username shown in the ECP portal. If you're unaware of how to search and identify a username in ECP portal, please reach out to your master admin or CSM. 

- Equinix Developer Community

Equinix Customer Portal


APIs that enables all aspects of Equinix Customer Portal features in a programmatic way. Includes user administration, order management & many other capabilities.