Fahrt v2 /api/v2/:principal_slug/business/logbook/entries

Überblick

Klasse / Datentyp
Fahrt
Response Formats
JSON
API Version
v2
Öffentlich erreichbar
false
HTTP Methode
POST
Zuletzt aktualisiert

/api/v2/:principal_slug/business/logbook/entries

Parameter

Body Parameter

Schlüssel
business_logbook_entry[charging_id] Pflicht
business_logbook_entry[date] Pflicht
business_logbook_entry[employee_id] Pflicht
business_logbook_entry[intangible_good_id] Pflicht
business_logbook_entry[internal_intangible_good_id] Pflicht
business_logbook_entry[is_private] Pflicht

Private Fahrt

business_logbook_entry[label] Pflicht
business_logbook_entry[milage_start] Pflicht
business_logbook_entry[vehicle_id] Pflicht
business_logbook_entry[client_id] optional
business_logbook_entry[description] optional
business_logbook_entry[internal_description] optional
business_logbook_entry[milage_end] optional
business_logbook_entry[project_id] optional

Beispiel Rückgabe

{
  "data" : {
    "id"                       : "5827635b1f513a0dc16b2138",
    "label"                    : "Meine neue Fahrt",
    "description"              : "Beschreibung meiner neuen Fahrt",
    "date"                     : "2016-11-12",
    "distance"                 : 100,
    "milage_start"             : 50000,
    "milage_end"               : 50100,
    "internal_description"     : "optionale interne Beschreibung",
    "is_private"               : false,
    "accounting_year"          : {"id" : "5640f7df93e2e504f700008f","code" : "2016","label" : "2016"},
    "charging"                 : {
      "id"    : "54d5fe5f6f726976d9030000",
      "key"   : "charchable",
      "label" : "Verrechenbar"
    },
    "client"                   : {
      "id"                     : "547ec0b4726f727326270000",
      "_type"                  : "Business::Partner::Client::BusinessClient",
      "name"                   : "Krolop & Gerst Photography",
      "backend_application_id" : null,
      "foreign_id"             : null
    },
    "period"                   : {
      "id"    : "5640f7df93e2e504f700009a",
      "code"  : "2016-11",
      "label" : "November 2016"
    },
    "project"                  : {
      "id"              : "5811b2eb56820b17a43848de",
      "label"           : "Zusatzaufwand GoLive",
      "number"          : 291,
      "abbreviation"    : "KG_2016_291",
      "date"            : "2016-10-26",
      "due_date"        : null,
      "type"            : "Business::Project::AtCost",
      "type_translated" : "Projekt nach Aufwand"
    },
    "employee"                 : {
      "id"        : "560a5ea66f726964b3000000",
      "firstname" : "Patrick",
      "lastname"  : "Lehmann",
      "email"     : "lehmann@squibble.me"
    },
    "intangible_good"          : {
      "id"             : "54fd986a6f72696dd0000000",
      "article_number" : "fahrtkosten",
      "label"          : "Fahrtkosten",
      "resource_class" : "Business::Product::IntangibleGood"
    },
    "internal_intangible_good" : {
      "id"             : "54fd986a6f72696dd0000000",
      "article_number" : "fahrtkosten",
      "label"          : "Fahrtkosten",
      "resource_class" : "Business::Product::IntangibleGood"
    },
    "price"                    : {"id" : "5827635c1f513a0dc16b213a","value" : 162},
    "internal_price"           : {"id" : "5827635c1f513a0dc16b213c","value" : 0},
    "vehicle"                  : {
      "id"           : "5788da6656820b1ba101028a",
      "label"        : "Mercedes Benz C43 AMG",
      "number_plate" : "XXXXXXXXXXX"
    },
    "next"                     : null,
    "previous"                 : {
      "id"           : "582665d056820b7be09fe5a8",
      "date"         : "2016-11-12",
      "distance"     : 89,
      "milage_start" : 5419,
      "milage_end"   : 5508
    }
  },
  "meta" : {
    "resource_class" : "Business::Logbook::Entry",
    "id"             : "5827635b1f513a0dc16b2138",
    "created_at"     : "2016-11-12T19:45:48.205+01:00",
    "updated_at"     : "2016-11-12T19:45:48.205+01:00",
    "principal"      : {"id" : "53db7cb4993a7aefa50001e1","to_param" : "squibble"}
  }
}