1
0
-1

When using the v2 API, how do I update the Export account settings for an animal?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Figured it out. First, get the list of available Export Accounts:

      {
        "token":"{{token}}",
        "tokenHash":"{{tokenHash}}",
          "objectType": "animalExportAccounts",
          "objectAction": "list"
      }

      This will return something like this:

      {
          "status": "ok",
          "messages": {
              "generalMessages": [],
              "recordMessages": []
          },
          "foundRows": 2,
          "data": {
              "12345": {
                  "name": "AdoptaPet-12345"
              },
              "54321": {
                  "name": "Petfinder-54321"
              }
          }
      }

      You can then add a new animal with the export accounts like this:

      {
        "objectAction": "add",
        "values": [
          {
            "animalStatusID": "3",
            "animalDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
            "animalReceivedDate": "14/01/2021",
            "animalMixedBreed": "Yes",
            "animalSex": "Male",
            "animalSecondaryBreedID": null,
            "animalSpeciesID": "Dog",
            "animalGeneralAge": "Adult",
            "animalAltered": "Yes",
            "animalRescueID": 11204,
            "animalBirthdate": "22/04/2018",
            "animalName": "George",
            "animalPrimaryBreedID": null,
            "animalExportAccounts": [
      			"12345",
      			"54321"
      		]
          }
        ],
        "token":"{{token}}",
        "tokenHash":"{{tokenHash}}",
        "objectType": "animals"
      }
        CommentAdd your comment...