Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 8
Registered: ‎01-30-2018

Account Updater Job Details response data structure does not match the documentation

I am running a request to getAUJobDetailsRequest. The documentation shows that deletes and updates should be seggregated into arrays (auDelete and auUpdate) that are held within the auDetails object as seen below. My actual response does not have the seggregation arrays, instead both deletes and updates are nested directly under the auDetails key as an array. Additionally there is no refId key. Can you please clarify what the actual data structure is?

 

 

Authorize.net api example:

{
  "totalNumInResultSet": 4,
  "auDetails": {
    "auDelete": {
      "customerProfileID": 2,
      "customerPaymentProfileID": 2,
      "firstName": "",
      "lastName": "",
      "updateTimeUTC": "6/28/2017 1:31:01 PM",
      "auReasonCode": "ACL",
      "reasonDescription": "AccountClosed",
      "creditCard": {
        "cardNumber": "XXXX1111",
        "expirationDate": "XXXX"
      }
    },
    "auUpdate": [{
        "customerProfileID": 88,
        "customerPaymentProfileID": 117,
        "firstName": "",
        "lastName": "Last name to bill_123",
        "updateTimeUTC": "6/27/2017 9:24:47 AM",
        "auReasonCode": "NED",
        "reasonDescription": "NewExpirationDate",
        "newCreditCard": {
          "cardNumber": "XXXX2222",
          "expirationDate": "XXXX"
        },
        "oldCreditCard": {
          "cardNumber": "XXXX1111",
          "expirationDate": "XXXX"
        }
      },
      {
        "customerProfileID": 89,
        "customerPaymentProfileID": 118,
        "firstName": "First name to bill_123",
        "lastName": "Last name to bill_123",
        "updateTimeUTC": "6/27/2017 9:25:09 AM",
        "auReasonCode": "NED",
        "reasonDescription": "NewExpirationDate",
        "newCreditCard": {
          "cardNumber": "XXXX1212",
          "expirationDate": "XXXX"
        },
        "oldCreditCard": {
          "cardNumber": "XXXX1111",
          "expirationDate": "XXXX"
        }
      },
      {
        "customerProfileID": 90,
        "customerPaymentProfileID": 119,
        "firstName": "First name to bill_123",
        "lastName": "Last name to bill_123",
        "updateTimeUTC": "6/27/2017 9:40:35 AM",
        "auReasonCode": "NAN",
        "reasonDescription": "NewAccountNumber",
        "newCreditCard": {
          "cardNumber": "XXXX3333",
          "expirationDate": "XXXX"
        },
        "oldCreditCard": {
          "cardNumber": "XXXX1111",
          "expirationDate": "XXXX"
        }
      }
    ]
  },
  "refId": 123456,
  "messages": {
    "resultCode": "Ok",
    "message": {
      "code": "I00001",
      "text": "Successful."
    }
  }
}

 

Actual results:

{
  "totalNumInResultSet": 4,
  "auDetails": [{
      "customerProfileID": 2,
      "customerPaymentProfileID": 2,
      "firstName": "",
      "lastName": "",
      "updateTimeUTC": "6/28/2017 1:31:01 PM",
      "auReasonCode": "ACL",
      "reasonDescription": "AccountClosed",
      "creditCard": {
        "cardNumber": "XXXX1111",
        "expirationDate": "XXXX"
      }
    },
    {
      "customerProfileID": 88,
      "customerPaymentProfileID": 117,
      "firstName": "",
      "lastName": "Last name to bill_123",
      "updateTimeUTC": "6/27/2017 9:24:47 AM",
      "auReasonCode": "NED",
      "reasonDescription": "NewExpirationDate",
      "newCreditCard": {
        "cardNumber": "XXXX2222",
        "expirationDate": "XXXX"
      },
      "oldCreditCard": {
        "cardNumber": "XXXX1111",
        "expirationDate": "XXXX"
      }
    },
    {
      "customerProfileID": 89,
      "customerPaymentProfileID": 118,
      "firstName": "First name to bill_123",
      "lastName": "Last name to bill_123",
      "updateTimeUTC": "6/27/2017 9:25:09 AM",
      "auReasonCode": "NED",
      "reasonDescription": "NewExpirationDate",
      "newCreditCard": {
        "cardNumber": "XXXX1212",
        "expirationDate": "XXXX"
      },
      "oldCreditCard": {
        "cardNumber": "XXXX1111",
        "expirationDate": "XXXX"
      }
    },
    {
      "customerProfileID": 90,
      "customerPaymentProfileID": 119,
      "firstName": "First name to bill_123",
      "lastName": "Last name to bill_123",
      "updateTimeUTC": "6/27/2017 9:40:35 AM",
      "auReasonCode": "NAN",
      "reasonDescription": "NewAccountNumber",
      "newCreditCard": {
        "cardNumber": "XXXX3333",
        "expirationDate": "XXXX"
      },
      "oldCreditCard": {
        "cardNumber": "XXXX1111",
        "expirationDate": "XXXX"
      }
    }
  ],
  "messages": {
    "resultCode": "Ok",
    "message": {
      "code": "I00001",
      "text": "Successful."
    }
  }
}
Authorize.Net Developer
Posts: 18
Registered: ‎11-23-2017

Re: Account Updater Job Details response data structure does not match the documentation

The sample response given in documentation is wrong. Your actual response is correct. But it will send back the refId key if you send it in the request. You can see the actual response type(getAUJobDetailsResponse) in the xsd https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd

Member
Posts: 8
Registered: ‎01-30-2018

Re: Account Updater Job Details response data structure does not match the documentation

Lets ignore the refId, we are not passing one so we will not get one back.

 

The "ListOfAUDetailsType" definition shows auUpdate and auDelete withing the XSD file. What I am saying is our response does not have these. This XSD seems to be inline with the documentation. So if the documentation is wrong, then this is wrong as well.

 

 

<xs:complexType name="ListOfAUDetailsType">
<xs:choice maxOccurs="unbounded">
<xs:element name="auUpdate" type="anet:auUpdateType" minOccurs="0"/>
<xs:element name="auDelete" type="anet:auDeleteType" minOccurs="0"/>
</xs:choice>
</xs:complexType>

 

Authorize.Net Developer
Posts: 18
Registered: ‎11-23-2017

Re: Account Updater Job Details response data structure does not match the documentation

Yes you are correct. I checked both xml and json response, the element names(auUpdate and audelete) are not coming in the json response. But these are coming in the xml response. It looks like a problem with the json response.

Member
Posts: 8
Registered: ‎01-30-2018

Re: Account Updater Job Details response data structure does not match the documentation

Ok, so how do we proceed? Will you be changing the documentation to reflect the differences in json, or bringing the json response inline with the XML? My concern here is regression for anyone who has coded to the current json implementation.