Skip to content

Instantly share code, notes, and snippets.

@Marthyn
Last active April 4, 2016 14:12
Show Gist options
  • Save Marthyn/fa562da9b4f3313cc4fb3c65cc7a0c2b to your computer and use it in GitHub Desktop.
Save Marthyn/fa562da9b4f3313cc4fb3c65cc7a0c2b to your computer and use it in GitHub Desktop.

Kiesvoorjezorg Koppeling

How to use

When there's a new or updated Facility in Kiesvoorjezorg, they have to send a POST request to api.gastvrijezorg.nl/api/v1/triggers. In the parameters we expect a code, id of the resource and your source identifier ('kvz') for example. Code 10 is a new Facility, code 20 is an update.

CODES = {
  "10" => "New",
  "20" => "Update",
  "30" => "Delete" #Not implemented yet
}

You also have to append your key/secret combination that was given to you, they can be sent as query parameters.

So the url looks like this

  http://acceptatie-api.gastvrijezorg.nl/api/v1/triggers?secret=yoursecret

and the params like this

  {
    id: 203984,
    code: "20",
    source: "kvz"
  }

If all went well a job will be enqueued and you'll get a JSON message back stating that.

Showing Care facilities

We also let you see into our care facilities,

http://acceptatie-api.gastvrijezorg.nl/api/v1/care_facilities/10099?secret=yoursecret

Will generate JSON with the care facility you requested. With that we can deliver the same service to you, if you open up an endpoint where we can push a new/updated care facility, you can call our API subsequently and update your data. This way we're always in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment