API reference

Munim Cares network

Credential-free reads of opted-in businesses' surplus listings and the published network impact. Recipients are simulated.

get

/v1/cares-network/cities

Cities with surplus-sharing businesses (Simulated recipients; Check your local food-donation rules)

operationId listCaresNetworkCities

Auth

No credential (public)

Response 200

V1CaresNetworkCitiescontract v1.cares-network.cities
  • itemsarray of objectrequired
    • codestringrequired
      max length 40pattern ^[a-z][a-z0-9_]*$
    • country_codestringrequired
      pattern ^[A-Z]{2}$
    • namestringrequired
      min length 1max length 200

Errors

Every error body carries a code, a message and, where it applies, a reason_code. All error and reason codes.

get

/v1/cares-network/listings

Live donation listings in a city to Simulated recipients

operationId listCaresNetworkListings

Auth

No credential (public)

Parameters

  • cityin querystringoptional
    pattern ^[a-z][a-z0-9_]*$
  • cursorin querystringoptional
    pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
  • limitin queryintegeroptional

Response 200

V1CaresNetworkListingscontract v1.cares-network.listings

Errors

Every error body carries a code, a message and, where it applies, a reason_code. All error and reason codes.

get

/v1/cares-network/listings/{id}

One live donation listing (404 when not live)

operationId getCaresNetworkListing

Auth

No credential (public)

Parameters

  • idin pathstringrequired
    pattern ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Response 200

V1CaresNetworkListingcontract v1.cares-network.listing
  • listing_idUuid7required
  • city_codestringrequired
    max length 40pattern ^[a-z][a-z0-9_]*$
  • business_namestringrequired
    min length 1max length 200
  • outlet_namestringrequired
    min length 1max length 200
  • pickup_fromIsoDatetimerequired
  • pickup_toIsoDatetimerequired
  • tzstringrequired
    pattern ^[A-Za-z]+\/[A-Za-z_]+$
  • recipient_namestringrequired
    min length 1max length 200
  • recipient_simulatedconst truerequired
  • linesarray of objectrequired
    • line_nointegerrequired
      ≥ 1≤ 9007199254740991
    • food_kindenum (3)required
      cookedrawpackaged
    • label_keystring | nullrequired
    • labelstring | nullrequired
    • qty_milliintegerrequired
      ≥ -9007199254740991≤ 9007199254740991
    • unitstringrequired
      pattern ^[a-z][a-z_]{0,15}$
    • expires_onstring (date) | nullrequired
      pattern ^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$

Errors

Every error body carries a code, a message and, where it applies, a reason_code. All error and reason codes.

get

/v1/cares-network/impact

Meals shared across Munim to Simulated recipients: the latest published network snapshot, each value beside its ref

operationId getCaresNetworkImpact

Auth

No credential (public)

Parameters

  • cityin querystringoptional
    pattern ^[a-z][a-z0-9_]*$

Response 200

V1CaresNetworkImpactcontract v1.cares-network.impact
  • snapshot_idUuid7required
  • as_ofIsoDatetimerequired
  • template_idstringrequired
    pattern ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$
  • template_versionintegerrequired
    ≥ 1≤ 9007199254740991
  • rowsarray of objectrequired
    • city_codestring | nullrequired
      max length 40pattern ^[a-z][a-z0-9_]*$
    • businessesobjectrequired
      • valueintegerrequired
        ≥ -9007199254740991≤ 9007199254740991
      • refRefrequired
    • donationsobjectrequired
      • valueintegerrequired
        ≥ -9007199254740991≤ 9007199254740991
      • refRefrequired
    • meals_portions_milliobjectrequired
      • valueintegerrequired
        ≥ -9007199254740991≤ 9007199254740991
      • refRefrequired
    • weight_gobjectrequired
      • valueintegerrequired
        ≥ -9007199254740991≤ 9007199254740991
      • refRefrequired
    • volume_mlobjectrequired
      • valueintegerrequired
        ≥ -9007199254740991≤ 9007199254740991
      • refRefrequired
    • all_syntheticobjectrequired
      • valuebooleanrequired
      • refRefrequired
  • labelsobjectrequired
    • dataconst "Measured on synthetic data"required
    • recipientsconst "to simulated recipients"required
  • note_keyconst "cares.note.check_local_rules"required

Errors

Every error body carries a code, a message and, where it applies, a reason_code. All error and reason codes.

get

/v1/cares-network/snapshots/{id}

A published network snapshot with its rows and sha256 (404 when unpublished)

operationId getCaresNetworkSnapshot

Auth

No credential (public)

Parameters

  • idin pathstringrequired
    pattern ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Response 200

V1CaresNetworkSnapshotcontract v1.cares-network.snapshot
  • snapshot_idUuid7required
  • template_idstringrequired
    pattern ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$
  • template_versionintegerrequired
    ≥ 1≤ 9007199254740991
  • paramsmap of one of 4 | nullrequired
  • columnsarray of objectrequired
    • namestringrequired
      pattern ^[a-z_][a-z0-9_]*$
    • typeenum (7)required
      integernumerictextdatetimestamptzbooleanuuid
    • numeric_sourceone of 2 | nulloptional
  • rowsarray of map of one of 3 | nullrequired
    max items 500
  • row_countintegerrequired
    ≥ 0≤ 500
  • sha256stringrequired
    pattern ^[0-9a-f]{64}$
  • created_atIsoDatetimerequired
  • published_atIsoDatetimerequired
  • labelsobjectrequired
    • dataconst "Measured on synthetic data"required
    • recipientsconst "to simulated recipients"required
  • note_keyconst "cares.note.check_local_rules"required

Errors

Every error body carries a code, a message and, where it applies, a reason_code. All error and reason codes.