We use cookies (just for analytics) on this website. If you continue we will assume you are happy with it. ok

BeBanjo

Back to index

Mapping

The mapping is used to name the values given on an enumeration entry

A mapping looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<mapping>
  <id type="integer">7</id>
  <name>Distribution Channel</name>
  <link rel="self" href="https://movida.bebanjo.net/api/mappings/7"/>
  <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
</mapping>

Note: currently mappings cannot be created/updated/destroyed through the API. Please, contact your Technical Account Manager in order to define the list of enumerations and mappings suitable for your company.

Valid attributes

  • name (required): string used internally to identify that entry.
  • enumeration (optional): The enumeration it belongs to.

Get a list of all mappings for an enumeration

Mappigns are accessed via the Enumeration they belong to, as in the example below, through the link identified by the rel="mappings" attribute:

<?xml version='1.0' encoding='utf-8' ?>
<enumerations type="array">
  <enumeration>
    <id type="integer">879</id>
    <name>BeBanjo:Platform Configuration</name>
    <link rel="self" href="https://movida.bebanjo.net/api/enumerations/879"/>
    <link rel="entries" href="https://movida.bebanjo.net/api/enumerations/879/entries"/>
    <link rel="mappings" href="https://movida.bebanjo.net/api/enumerations/879/mappings"/>
  </enumeration>
</enumerations>

If we follow that link, we can fetch the list of all entries for that enumeration.

$ curl --digest -u robot_user:password http://www.example.com/api/enumerations/879/mappings
<?xml version="1.0" encoding="UTF-8"?>
<mappings type="array">
  <mapping>
    <id type="integer">9</id>
    <name>Business Model</name>
    <link rel="self" href="https://movida.bebanjo.net/api/mappings/9"/>
    <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
  </mapping>
  <mapping>
    <id type="integer">8</id>
    <name>Channel Brand</name>
    <link rel="self" href="https://movida.bebanjo.net/api/mappings/8"/>
    <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
  </mapping>
</mappings>

Last updated December 02th, 2019.