Skip to main content

Menu Export/Import

Import flow

Create Import Session

$ curl -X POST 'https://api.takeme.com/api/admin/order-menu/import-create' -d 'shop=[shopId]' -H 'X-Auth-API-Key: [api-key-obtained]'
> { "objectId": "Object ID for processing", "url": "AWS URL for uploading"}

Upload File to S3

curl --data-binary "@path/to/archive" 'AWS URL for uploading'

Perform Import

curl -X POST 'https://api.takeme.com/api/admin/order-menu/import-start' -d 'shop=[shopId]&deleteOld=[delete existing or not]&objectId=[import object id]' -H 'X-Auth-API-Key: [api-key-obtained]'

Then the upload will begin in background. You can use API below to get progress.

Query Import Progress

curl -X POST 'https://api.takeme.com/api/admin/order-menu/import-state' -d 'shop=[shopId]&objectId=[import object id]' -H 'X-Auth-API-Key: [api-key-obtained]'

Model Definitions

NameTypeRequiredDescription
idUUID StringYesUnique ID for menu
menuTemplateIdUUID StringNoForeign key of menu template
nameJaString (255)YesName in Japanese
descJaString (65536)NoDescription in Japanese, HTML formatted (see details)
shortDescJaString (65536)NoShort description in Japanese, better to have one line only
imagesString (65536)NoImages of menu, relative to archive root. JSON String Array format
imageStringNoImages of menu, relative to archive root. Can be an HTTPS URL. Multiple <image/> tags are allowed.
menuPriceIntegerYesPrice of a menu
taxIncludedFlgCharYes1 for tax incl. 0 otherwise
taxReliefApplicableFlgCharYes1 for 軽減税率対応商品
taxOverrideIntegerNoTo override default tax calculation
taxReliefOverrideIntegerNoTo override default tax calculation for 軽減税率対応商品
statusEnum (Menu.Status)YesStatus of menu, see Menu.Status
forTakeoutFlgCharYes1 for takeout menu
forDeliveryFlgCharYes1 for delivery menu
forCafeteriaFlgCharYes1 for food court menu
smaregiProductIdString (32)NoID for Smaregi product
maximumPerOrderIntegerNoMaximum menu item per order limitation. 0 means no limitation
availableStartLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoMenu will be disabled before this date/time (= PREPARING status)
availableEndLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoMenu will be disabled after this date/time (= PREPARING status)
visibleStartLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoMenu will be hidden before this date/time
visibleEndLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoMenu will be hidden after this date/time
stockMenu.StockRelationshipNoStock linked to this menu
metadataMenu.MetadataNoMetadata for menu, ask sales for details
translationMenu.TranslationNoTranslations for menu, ask sales for details
ValueNameDescription
10DRAFTNot visible to customers
15PREPARINGVisible, but can't be selected for checkout
20PUBLISHEDVisible to customers
90DELETEDMarked for deletion, not visible to customers
NameTypeDescription
idUUID AttributeStock ID for this menu item
NameTypeDescription
keyString AttributeMetadata key
ContentText Content(255)Metadata value
NameTypeDescription
languageString AttributeLanguage code
nameString(255)Name in specified language
shortDescStringShort description in language
descStringDescription in language

XML Example of Menus

Menu is stored in archive file as menus.xml


<Menus>
<Item>
<id>f8f32cd0-98aa-11ea-8e6f-0a58a9feac2a</id>
<nameJa>カフェラテ</nameJa>
<type>30</type>
<descJa></descJa>
<shortDescJa>グアテマラ産のエスプレッソにスチームミルク</shortDescJa>
<!--
Following field will be supported, but please use new format instead
<images>["/images/course/268cc740-441e-11eb-87db-0a58a9feac2a.jpg"]</images>
-->
<!-- Suggested new format -->
<image>/images/course/268cc740-441e-11eb-87db-0a58a9feac2a.jpg</image>
<!-- Multiple items can be defined like this -->
<image>/images/course/2a3d8668-013f-11ef-a08c-00155dff7986.jpg</image>
<menuPrice>650</menuPrice>
<menuPriceOriginal>0</menuPriceOriginal>
<taxIncludedFlg>1</taxIncludedFlg>
<taxReliefApplicableFlg>0</taxReliefApplicableFlg>
<taxOverride>0</taxOverride>
<taxReliefOverride>0</taxReliefOverride>
<status>20</status>
<forTakeoutFlg>1</forTakeoutFlg>
<forDeliveryFlg>0</forDeliveryFlg>
<forCafeteriaFlg>1</forCafeteriaFlg>
<!-- One item only for an order -->
<maximumPerOrder>1</maximumPerOrder>
<!-- Stock linkages -->
<stock id="bf133484-1348-11ef-a609-00155d5f6f50"/>
<stock id="c424aa48-1348-11ef-aee9-00155d5f6f50"/>
<!-- Metadata can be useful, please ask sales -->
<metadata key="receipt_printer">kitchen</metadata>
<metadata key="my_defined_key">My defined value</metadata>
<translation language="en">
<name>Café Latte</name>
<shortDesc>Guatemalan espresso with steamed milk</shortDesc>
</translation>
<translation language="zh-CN">
<name>咖啡拿铁</name>
<shortDesc>危地马拉意式浓缩咖啡加入美味牛奶</shortDesc>
</translation>
</Item>
<!-- more items... -->
</Menus>

Template

NameTypeDescription
idUUID StringUnique ID for template
nameJaString (255)Name in Japanese

XML Example of Templates

Template is stored in archive file as templates.xml


<Templates>
<Item>
<id>f8881e50-7198-11eb-b689-0a58a9feac2a</id>
<nameJa>すし</nameJa>
</Item>
</Templates>

Variation

A variation (topping) is addition to a menu. For example extra Sliced pork on a bowl of Ramen (which costs extra money), or Wasabi preferences of a plate of sushi (free).

New format

A variation can be standalone, and normal menu can be used as variation, combined with VariationRelationship.

NameTypeRequiredDescription
idUUID StringYesUnique ID for variation
nameJaString (255)YesName in Japanese
shortDescJaString (65536)NoShort description in Japanese, better to have one line only
imagesString (65536)NoImages of menu, relative to archive root. JSON String Array format
imageStringNoImages of menu, relative to archive root. Can be an HTTPS URL. Multiple <image/> tags are allowed.
menuPriceIntegerYesPrice of a menu
taxIncludedFlgCharNo1 for tax incl. 0 otherwise
taxReliefApplicableFlgCharNo1 for 軽減税率対応商品
taxOverrideIntegerNoTo override default tax calculation
taxReliefOverrideIntegerNoTo override default tax calculation for 軽減税率対応商品
smaregiProductIdString (32)NoID for Smaregi product
maximumPerOrderIntegerNoMaximum menu item per order. (Not enabled yet)
availableStartLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoVariation will be disabled before this date/time
availableEndLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoVariation will be disabled after this date/time
visibleStartLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoVariation will be hidden before this date/time
visibleEndLocalDateTimeDate(yyyy-MM-dd'T'HH:mm)NoVariation will be hidden after this date/time
stockMenu.StockRelationshipNoStock linked to this menu
metadataMenu.MetadataNoMetadata for menu, ask sales for details
translationMenu.TranslationNoTranslations for menu, ask sales for details
variationParentIdUUID StringNot allowed
variationCategoryIdUUID StringNot allowed
sortOrderIntegerNot allowed

Legacy format

A variation can belong to menu, or a template.

NameTypeDescription
idUUID StringUnique ID for variation
nameJaString (255)Name in Japanese
menuPriceIntegerPrice of a menu
taxIncludedFlgChar1 for tax incl. 0 otherwise
taxReliefApplicableFlgChar1 for 軽減税率対応商品
taxOverrideIntegerTo override default tax calculation
taxReliefOverrideIntegerTo override default tax calculation for 軽減税率対応商品
smaregiProductIdString (32)ID for Smaregi product
variationParentIdUUID StringForeign key to Menu
variationCategoryIdUUID StringForeign key to VariationCategory
sortOrderIntegerSort index in a category, starts from 0
maximumPerOrderIntegerMaximum menu item per order limitation.

XML Example of Variations

Variations are stored in archive file as variations.xml


<Variations>
<!-- variations under f8f32cd0-98aa-11ea-8e6f-0a58a9feac2a -->
<Group key="f8f32cd0-98aa-11ea-8e6f-0a58a9feac2a">
<Item>
<id>a295d652-59ea-438c-a284-171ca8a2a7a5</id>
<nameJa>クッキー</nameJa>
<type>90</type>
<!--
Following field will be supported, but please use new format instead
<images>["/images/course/268cc740-441e-11eb-87db-0a58a9feac2a.jpg"]</images>
-->
<!-- Suggested new format -->
<image>/images/course/268cc740-441e-11eb-87db-0a58a9feac2a.jpg</image>
<!-- Multiple items can be defined like this -->
<image>/images/course/2a3d8668-013f-11ef-a08c-00155dff7986.jpg</image>
<menuPrice>0</menuPrice>
<taxIncludedFlg>1</taxIncludedFlg>
<taxReliefApplicableFlg>0</taxReliefApplicableFlg>
<taxOverride>0</taxOverride>
<taxReliefOverride>0</taxReliefOverride>
<!-- Following fields are not allowed in new format -->
<variationParentId>f8f32cd0-98aa-11ea-8e6f-0a58a9feac2a</variationParentId>
<variationCategoryId>7f2f143e-8dbc-490b-b156-440f042bbade</variationCategoryId>
<sortOrder>0</sortOrder>
<!-- Metadata can be useful, please ask sales -->
<metadata key="receipt_printer">kitchen</metadata>
<metadata key="my_defined_key">My defined value</metadata>
</Item>
<!-- more items... -->
</Group>
<!-- more groups... -->
</Variations>

VariationCategory

New format

In new menu format, Menu, Variation and VariationCategory, are connected by VariationRelationship object.

NameTypeDescription
idUUID StringUnique ID for variation category
nameJaString (30)Name in Japanese
requiredBooleanIf this category must be selected
exclusiveBooleanIf this category will be a single-selection dropdown
defaultChoiceNameJaString (30)Default name for dropdown when there's is no selection
showGalleryBoolean or nullfalse to show variations as dropdown or buttons only. true to show as horizontal list always. null to show as horizontal list if there are images in the variations.
sortOrderIntegerIgnored.

Legacy format

NameTypeDescription
idUUID StringUnique ID for variation category
nameJaString (30)Name in Japanese
requiredBooleanIf this category must be selected
exclusiveBooleanIf this category will be a single-selection dropdown
defaultChoiceNameJaString (30)Default name for dropdown when there's is no selection
sortOrderIntegerSort index in a category, starts from 0

XML Example of VariationCategories

Variation categories is stored in archive file as variationCategories.xml


<VariationCategories>
<Item>
<id>a507d53e-57e5-40c3-a175-3333de305e03</id>
<nameJa>1、ハンバーグ</nameJa>
<required>false</required>
<exclusive>false</exclusive>
<!-- sortOrder field is not needed in new format -->
<sortOrder>0</sortOrder>
<showGallery/>
</Item>
<Item>
<id>d1053262-45e9-4110-bd5f-f50acd7bb3bc</id>
<nameJa>その他</nameJa>
<required>true</required>
<exclusive>true</exclusive>
<defaultChoiceNameJa>なし</defaultChoiceNameJa>
<sortOrder>1</sortOrder>
</Item>
</VariationCategories>

VariationRelationship

In new menu format, Menu, Variation and VariationCategory, are connected by VariationRelationship object. By building relationship with items, you can now use normal menu items as topping for a menu. Duplicated variations or variation categories can also be eliminated.

NameTypeDescription
menu.keyUUID StringForeign key to Menu
variation.keyUUID StringForeign key to Menu, can be a variation or normal menu item
category.keyUUID StringForeign key to VariationCategory
category.sortOrderIntegerIndex of variation categories in the menu, starts from 0
variation.sortOrderIntegerIndex of variation in the category, starts from 0

XML Example of VariationRelationships

Variation relationships is stored in archive file as variationRelationships.xml


<VariationRelationships>
<Menu key="002c32f0-6a81-42f5-83ca-d7a4314bcb92">
<Category key="ea818591-c15e-43e4-864d-0b81bb233fb7">
<Variation key="e7a22ab8-5908-4018-8a87-7f5578645eec"/>
<Variation key="4a8992dd-0534-4007-bc25-fc7863efa16f"/>
</Category>
<Category key="0f78c6ce-88d3-42a1-9574-fad1a86ef897">
<Variation key="aa9a880d-709a-4001-8097-09429c0059c0"/>
</Category>
</Menu>
</VariationRelationships>
NameTypeDescription
idUUID StringUnique ID for menu category
nameJaString (30)Name in Japanese
sortOrderIntegerSort order for menu categories
profileIdUUID StringForeign key to MenuCategoryProfile

XML Example of MenuCategories

Menu categories is stored in archive file as menuCategories.xml


<MenuCategories>
<Item>
<id>f49ad345-6eb6-4d4b-ade8-641f24a6d4a0</id>
<nameJa>フード</nameJa>
<sortOrder>0</sortOrder>
</Item>
<Item>
<id>30a3392a-16d9-45fd-9f50-b648be0b8120</id>
<nameJa>ドリンク</nameJa>
<sortOrder>1</sortOrder>
</Item>
<Item>
<id>2b9f0a3d-9fc2-4305-920f-708ae5ef9a4e</id>
<nameJa>デザート</nameJa>
<sortOrder>2</sortOrder>
</Item>
</MenuCategories>

A shop can have multiple menu category profiles, which can be used to show different menus to customers.

Default profile is always available.

When the slug is specified in the URL, only categories with the profile will be shown.

NameTypeDescription
idUUID StringUnique ID for menu category
slugString (64)Slug (part of the URL) for profile. e.g. special
nameString (64)Name of profile

XML Example of MenuCategoryProfiles


<MenuCategoryProfiles>
<Profile>
<id>cdb2c158-dec6-4e4b-9ded-0e2241ebf394</id>
<slug>soup-packs</slug>
<name>冷凍スープ/カレー</name>
</Profile>
</MenuCategoryProfiles>
NameTypeDescription
categoryIdUUID StringForeign key to category
menuIdUUID StringForeign key to menu
sortOrderIntegerSort order for menu in the category

XML Example of MenuCategoryRelationships

Menu category relationships is stored in archive file as menuCategoryRelationships.xml


<MenuCategoryRelationships>
<Group key="f49ad345-6eb6-4d4b-ade8-641f24a6d4a0">
<Item>
<categoryId>f49ad345-6eb6-4d4b-ade8-641f24a6d4a0</categoryId>
<menuId>2455fa50-9a5a-11ea-8e6f-0a58a9feac2a</menuId>
<sortOrder>0</sortOrder>
</Item>
<Item>
<categoryId>f49ad345-6eb6-4d4b-ade8-641f24a6d4a0</categoryId>
<menuId>d3184ad0-4427-11eb-8c6f-0a58a9feac2a</menuId>
<sortOrder>1</sortOrder>
</Item>
<Item>
<categoryId>f49ad345-6eb6-4d4b-ade8-641f24a6d4a0</categoryId>
<menuId>c428c940-4428-11eb-86ca-0a58a9feac2a</menuId>
<sortOrder>2</sortOrder>
</Item>
<!-- more items... -->
</Group>
<!-- more groups... -->
</MenuCategoryRelationships>

Stock

Item to manage availability of linked menu items.

NameTypeRequiredDescription
idUUID StringYesUnique ID for stock
nameString (50)YesName of stock item
availableBooleanNoLinked menu will not be able to add to cart if false
visibleBooleanNoLinked menu will not visible to customers if false
memoString(200)NoMemo for stock item

XML Example of Stocks

Stocks are stored in archive file as stocks.xml


<Stocks>
<Stock>
<id>c424aa48-1348-11ef-aee9-00155d5f6f50</id>
<name>エスプレッソ</name>
<available>true</available>
<visible>true</visible>
</Stock>
<Stock>
<id>bf133484-1348-11ef-a609-00155d5f6f50</id>
<name>牛乳</name>
<available>true</available>
<visible>true</visible>
<memo>おいしい牛乳</memo>
</Stock>
</Stocks>

Images

Images are stored in images/course related to archive root. Please don't upload huge images, for better experience when user visits the shop page.

Caveats

Migrated Menus

If a shop has their menus migrated to new format, then during import, if deleteOld is not set to true, import file with old menu format will be rejected, and vise versa.

If deleteOld is specified, then the menu data will be fully replaced (old data will be all deleted).