hundertzehn / mocoapp-api-docs Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://hundertzehn.github.io/mocoapp-api-docs/
Home Page: https://hundertzehn.github.io/mocoapp-api-docs/
I'd like to ask for an API endpoint that allows us to fetch timesheet data (i.e. the amount of work spent in a project grouped by the configured tasks).
The data returned by the endpoint should roughly be the same as given by Moco at https://<your_domain>.mocoapp.com/projects/<project_id>/timesheet
. Preferably this endpoint should allow to specify the time range for which the data is collected, i.e. the current or the last month or even a custom range.
What do you think?
Currently it is not possible to delete an invoice, since we work a lot with draft invoices temporarily, we want to automate this step and delete invoices.
Hello,
I tried to communicate with your REST api from my browser. I set up authorization header, etc. for example getting projects but I get a cors error. seems like you have to enable cors preflight requests on the server...
Request copied as fetch:
fetch("https://xxx.mocoapp.com/api/v1/projects", {"credentials":"omit","headers":{"sec-fetch-mode":"no-cors"},"referrer":"http://localhost:8080/","referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"OPTIONS","mode":"cors"});
JS Console Error:
Access to XMLHttpRequest at 'https://zweischneider.mocoapp.com/api/v1/projects' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If you need more details let me know.
Kindly regards
I can start the timer for a Task if I set the hours
value to 0. But how can I stop it? Currently I just could only start a new one and then delete it immediately :)
I tried it via PATCH: /projects/{project_id}/stop_timer
like it's being called on the website but it didn't worked out .
It would be great to either
We have build a small dashboard and would like to show that value compared to the costs set in Moco, to transparently show how we're doing :)
Hey there!
I already had a nice chat with Thomas about this.
We would like to automate our invoicing. For that it would be necessary to send an invoice via API.
For now - as a workaround - we send the emails using an email service and attach the invoices manually using the /invoices/{id}.pdf endpoint.
Greetings to Switzerland,
Corvin
Hello,
currently activities have to created with a task_id in mind
(see https://github.com/hundertzehn/mocoapp-api-docs/blob/master/sections/activities.md#post-activities).
On the other hand if you retrieve activities from the api you cannot filter by task_id, you have to do it manually.
It would be very nice if task_id could be added as an optional parameter of get-activies.
Hello,
is it possible to read the new schedules-beta items from the Api?
I can't find an schedule Item with hours. Only the with the am und pm flag.
I tried https://xxx.mocoapp.com/api/v1/schedules-beta and similiar but there is no endpoint.
Thanks in advance.
Is it planned that invoices can also be created as drafts via the API?
We have fixed-term contracts with many customers. All of these are single projects in Moco. Some customers also have several contracts (and also projects). At the beginning of the month, we create an invoice for each customer for all contracts they have.
We would like to automate this process using the API. We have already created a script for this. But we would prefer to create the invoices as drafts, as we will partly add manual items.
Thanks
Peter
Hello there,
Is it possible to PUSH/PUT the tags/labels through the deals
-endpoint?
The field isn't mentioned in the deals
PUSH-documentation, so I'm guessing it's currently not possible.
The companies
-endpoint has this feature so I tried it the same way for deals
. I submitted the field as either labels
or tags
and the value being an array of strings, but no luck. Also tried it with a comma-separated list out of desperation, but nope.
If it's currently not possible at all. Could we put it down as a feature request? :)
On an almost related note: The deals
-endpoint allows a field person_id
(ContactsPeople for a Deal) to be pushed, but this field isn't mentioned in the PUSH-documention. It worked though.
Thanks in advance and cheers!
Hello,
we need an api endpoint so we can automatically set the period lock (Periodensperre).
I didn't found something like that in the docs. Correct me please, if i'm wrong.
Even better would be a setting in the frontend to set a time to lock all changes.
For example a new day begins (00:01) and the period lock is set 48 hours before today.
So all accounts can edit the last two days only.
This shall prevent later manipulation.
Thanks for your help!
Best regards
As part of our automation, it would be helpful if we could create invoice reminders using the API. Because there is no bulk function via the frontend.
Like GET /projects/{project_id}/payment_schedules -> GET /projects/payment_schedules
PARAMS:
How to get the project and task IDs as user that does not have access to projects? In the webclient the IDs are included as JSON inside the HTML and the webclient is not using the API. But how to create activity entries through the API? GET /api/v1//projects should at least return the projects with tasks that are available for the user.
Hello,
unfortunately the endpoint for purchase creation does not work as described in the documentation.
Our curl statement with just the required parameters gets a 500 response status code.
curl -X POST \
'https://{domain}.mocoapp.com/api/v1/purchases' \
-H 'Authorization: Token token=YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '
{
"date": "2020-02-02",
"currency": "EUR",
"payment_method": "bank_transfer",
"items": [
{
"title": "Ticket",
"total": 30,
"tax": 10,
"tax_included": true,
}
],
}'
Hi!
Is it possible to filter Invoice Payments by date?
Best regards
Dima
I have trouble generating the correct signature with NodeJS.
Could you add an example for that?
My code so far:
const signature = crypto.createHmac('sha256', 'key')
.update(
JSON.stringify(event) // Tried with the whole event/body object and only { id, description }.
)
.digest('hex')
Edit: I've tried your example Ruby code and compared the signature with my NodeJS result – they are identical. I assume the payload is wrong. How should I convert the object to string and WHICH object to convert?
Wir würden gern automatisiert auf zu große Abweichung von Mitarbeitern im Soll-Ist Performance Report reagieren können. Beispiel hierfür wäre eine Slack Nachricht wenn der Mitarbeiter mehr als 24 Stunden in der Erfassung zu seinem Soll fehlen oder auch wenn er zu viel arbeitet.
Leider kann ich aktuell in der API nichts zu Soll-Ist Reports finden. Zwar git es die zugrunde liegenden Daten aber ein Nachbau der Auswertung ist kompliziert und Fehleranfällig.
Currently it is not possible to mention a user when commenting (POST /comments
) via the API. It would be helpful if you could pass mentioned_user_ids
as a field (like in the internal API).
Hi there,
We plan to connect Moco to a bookkeeping software we are using. Therefore we like to create incoming invoices as "Ausgaben" in Moco via the API. It looks like the API has no endpoints for that yet or am I missing something?
Cheers
Christian
When using the POST /activities/disregard
endpoint, we noticed that if no payload or an incorrect payload is submitted, only a 404 is returned and not a 400 with the error message.
Hi there,
it would be great to have the ability of setting internal rates via the API.
Right now we are using Zapier to get notified in a Slack channel about our missed SIP calls.
The contact information is stored in MOCO.
It would be nice to be able to find a MOCO contact by number so that we could add this information in the Slack message.
Am I missing something or is this not possible right now?
Hey there,
first of all thanks for the awesome API implementation. I am wondering, why I can't see the field hours
in the response when requesting this URL:
https://OUR_SUBDOMAIN.mocoapp.com/api/v1/activities?from=2019-01-01&page=2&project_id=PROJECT_ID&to=2019-01-31&user_id=
The fields are:
id,date,description,billed,billable,tag,remote_service,remote_id,remote_url,project/id,project/name,project/billable,task/id,task/name,task/billable,customer/id,customer/name,user/id,user/firstname,user/lastname,timer_started_at,created_at,updated_at
I checked, if there is an entry and it should be 2,25 hours.
Do I miss something?
Thanks and all the best
Andy
Hello.
At the moment when we want to create a deal via api request we must supply deal_category_id but regrettably there is no option available to retrieve the availabe deal_category_id's via api.
We have to go to the admin dashboard and copy the deal_category_id we want to use manually.
Maybe an endpoint can be created to list all available categories (something like /deals/categories or /deals/deal_categories would be great).
Hi Moco Team,
as part of our planned automation of accounting, we would like to use the API to "plan billing".
(In German "Abrechnung planen").
I am looking forward to your feedback if this feature makes sense for you or not?
Greetings Peter
Hi,
could you add support for GraphQL?
In MocoApp we use the labels/tags as intermediate states to control automation internally. It would be really great if we could update an invoice.
An endpoint like https://github.com/hundertzehn/mocoapp-api-docs/blob/master/sections/invoices.md#put-invoicesidupdate_status would be sufficient to update the tags.
Is this possible in the short term?
The fields 'service_period_from' and 'service_period_to' must always be set together. If only one of the fields is set, an error 500 occurs.
Here a 422 message should be returned.
It would be great, if we could submit a POST /offers/{id}/send_email for offers too, as it is for invoices! and of course provide a letter_paper_id in both cases :-)
Thanks
Ralf Schwalbe
Hi again,
due to the fact, that the API is responding in shards by 100 entries, but the data I need are much more, I calculated the number of pages (iterations) I need to get the full data set. I am reading the header "x-total". So in this example I need 81 iterations, to get all data:
~/p/s/m/moco_api git:master ❯❯❯ bundle exec bin/moco_api activities --from=2019-02-01 --to=2019-02-28 --export_csv
After each iterations request I set a sleep(5)
. That are 5 seconds to wait. Unfortunately I receive this after the first 8 to 18 iterations:
Iterations: 81 ................bundler: failed to load command: bin/moco_api (bin/moco_api) Faraday::TimeoutError: Failed to open TCP connection to BLABLA.mocoapp.com:443 (Operation timed out - connect(2) for "BLABLA.mocoapp.com" port 443)
I am aware, that you are limiting the request by writing in the docs:
You can expect to be able to fire 15 requests within a time frame of 15 seconds. If you exceed this limit, the server responds with 429 Too Many Requests.
But in my case I don't fire one request in one second or 15 in 15 seconds and I don't get a 429 code.
Do I miss something here? It was last night 30.04.2019 between 10:00 pm and 01.05.2019 01:00 am.
Additional question: is there a way to avoid the 100 lines result per request?
Thanks a lot for any advise or help.
Cheers
Andy (sumcumo.com)
As in the Internal API for the web app, it would be desirable for further automation if you could attach the "expense_ids" to the item so that they are automatically marked as billed.
As a workaround I can use the endpoint POST /projects/{id}/expenses/disregard
, but there is the risk that if the invoice is cancelled, the expense items will not be billed again because there is no reference for Moco.
Therefore we are currently using the internal API to create the invoices.
Wenn POSTing a schedule with both parameters am
and pm
set to false
causes the server to respond with status code 500
.
I'm not sure whether this is working as intended (as setting both parameters to false
for a single day makes absolutely no sense) but at least in my experience 500
s are rarely intended.
* Trying 2a03:b240:100::4:443...
* TCP_NODELAY set
* Connected to somedomain.mocoapp.com (2a03:b240:100::4) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.mocoapp.com
* start date: Dec 31 20:50:39 2020 GMT
* expire date: Mar 31 20:50:39 2021 GMT
* subjectAltName: host "somedomain.mocoapp.com" matched cert's "*.mocoapp.com"
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x555d08c12100)
> POST /api/v1/schedules?date=2020-12-23&absence_code=5&user_id=someuserid&am=1&pm=1&symbol=11&overwrite=1 HTTP/2
Host: somedomain.mocoapp.com
accept: */*
authorization: Token token=sometoken
* Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
< HTTP/2 200
< cache-control: max-age=0, private, must-revalidate
< content-type: application/json; charset=utf-8
< etag: W/"48206902a655f839d0f25d0ea391f7dd"
< referrer-policy: strict-origin-when-cross-origin
< vary: Origin
< x-content-type-options: nosniff
< x-download-options: noopen
< x-frame-options: SAMEORIGIN
< x-permitted-cross-domain-policies: none
< x-request-id: 461ffdc3-f568-4737-bb72-7c360645a81c
< x-runtime: 0.045808
< x-xss-protection: 1; mode=block
< content-length: 340
< date: Mon, 18 Jan 2021 08:55:43 GMT
<
* Connection #0 to host somedomain.mocoapp.com left intact
Hi,
currently when you request a deal object over the api with a company attached the type will be returned as company::{company_type} (eg. "company::customer").
Shouldn't this just be customer?
https://{domain}.mocoapp.com/api/v1/deals/{id}'
{
"id": "",
....
"company": {
"id": "",
"type": "company::customer",
"name": "Beispiel GmbH"
},
}
Here is the example response from the api docs
https://github.com/hundertzehn/mocoapp-api-docs/blob/master/sections/deals.md
"id": 123,
"name": "Website V2",
"status": "pending",
"reminder_date": "2017-05-19",
"money": 61000,
"currency": "CHF",
"info": "Interesting Lead!",
"custom_properties": {
"Type": "Website"
},
"user": {
"id": 933593033,
"firstname": "Nicola",
"lastname": "Piccinini"
},
"company": {
"id": 760260535,
"name": "Beispiel AG",
"type": "Customer"
},
"category": {
"id": 12,
"name": "Angebot",
"probability": 30
},
"created_at": "2018-10-17T09:33:46Z",
"updated_at": "2018-10-17T09:33:46Z"
}
If I define a different e-mail address below a project in the billing. Where is this response in the API to take it when sending our own e-mail?
Hello, a couple of months ago I wrote an api client for this API and just today I've noticed how the /contacts/organizations endpoint is no longer available.
It seems its documentation is also gone.
https://www.mocoapp.com/404#233-get-contacts-organizations
https://github.com/hundertzehn/mocoapp-api-docs/tree/master/sections
https://github.com/Burnett01/node-moco#get-contacts-organizations
I suppose its deprecated?
Cheers, Steve
Hi,
the documentation describes curl commands to retrieve API data and these commands are working properly. What is weird though is that fetch responds with an 401 error with exactly the same data as in curl.
curl -X GET \
'https://OURDOMAIN.mocoapp.com/api/v1/projects.json' \
-H 'Authorization: Token token=OURNICETOKEN'
const res = await fetch('https://OURDOMAIN.mocoapp.com/api/v1/invoices', {
headers: {
Authorization: 'Token token=OURNICETOKEN'
},
mode: 'no-cors'
})
Any idea where I am heading in the wrong direction?
Thanks,
Harald
It would be great, if we could supply a letter_paper_id for invoices (/invoicess/{id}.pdf?letter_paper_id=12345) too, as it is for offers! At the moment it's just blank or standard
is there any plan to have the MocoApp translated to english?
Is there any way we can help you do that?
Hey zusammen, irgendwie klappt bei mir updated_after nicht ...
https://xxxx.mocoapp.com/api/v1/projects/xxxx/tasks?updated_after=2019-12-05T10:39:09Z
Was mache ich falsch?
Danke für einen kurzen Tipp und viele Grüße,
Hauke
Hello,
we noticed when creating holiday credits, via the api, that the hours property was not set after creating the holiday entry.
When created via curl request:
curl -X POST 'https://{domain}.mocoapp.com/api/v1/users/holidays' -H 'Authorization: Token token={TOKEN}' -H 'Content-Type: application/json' -d '{ "user_id": 1234, "year": 2020, "title": "Holiday credits", "hours": 20 }'
Response:
{
"id": 1234,
"year": 2020,
"title": "Holiday credits",
"days": 2.5,
"hours": 0,
"user": {
"id": 1234,
"firstname": "test",
"lastname": "test"
},
"created_at": "2020-12-23T10:37:26Z",
"updated_at": "2020-12-23T10:37:26Z"
}
When the holiday is created over the web app, then retrieved over the api, the the data looks like this:
{
"days": 2.5,
"hours": 20,
"id": 1234,
"title": "Holiday credits",
"user": {
"id": 12345,
"firstname": "test",
"lastname": "test"
},
"year": 2020,
"created_at": "2020-12-24T10:43:11Z",
"updated_at": "2020-12-24T10:43:11Z"
}
Thank you and merry christmas :)
The POST-Request for creating an activity is not working.
Calling Curl via console is triggering Field-Errors for "date" and "description" like...
"date":["muss ausgefüllt werden","ist nicht gültig"],
"description":["ist zu kurz (weniger als 3 Zeichen)"]
Calling the API via POSTMAN we will get only a "301 - Moved permanently"
Is there anything we didnt recognized? Thanks in advance.
Here the curl request:
curl -X POST 'https://nfq.mocoapp.com/api/v1/activities'
-H "Authorization: Token token={moco_api_key}"
-H 'Content-Type: application-json'
-d '{"date": "2019-02-04", "description": "Moco Api test with more than 3 characters.", "hours": 1.0, "project_id": 944739918, "task_id": 1729356}'
Unfortunately, it is not possible to see from a Project Expense from which recurring expense it was created or with which interval what would be very important for the calculation of the service period.
An additional service that is calculated every three months has a different service period than a monthly one.
An API to retrieve target hours vs. actual hours.
Hi!
We are using data from your api to show some personalized information on internal dashboard.
And we would like to show three pieces of information that - if I understand correctly - are a bit difficult/impossible to get:
So my question is if I understand correctly that at current state of the api I can get information from point 1 and 2 only by manually iterating through Activities/Schedules respectively and I can't get information from point 3 at all?
And if my understanding indeed is correct, would you consider adding endpoints that would make getting those information in more straightforward way? :)
Thanks in advance for your help!
Best regards from Aachen!
we are trying to customize the moco browser extension to work with clickup. We forked the extension and customized it already. The only issue currently is that the remote_service we send to the activites api call sends invalid "remote_service" back. can you please activate clickup as a valid value in the api? otherwise we have to mock this service as trello or something else...
if you also build in the link to clickup tasks, the expected urls are like:
https://app.clickup.com/t/{task_id}
When we generated an invoice without set the contact, the project manager was displayed on the invoice or the contact of the customer.
Now the API user who generates the invoice always appears. I have also not found a variable in the API documentation to change this again.
It would be great if it would just use the project manager like before (if not set).
I POST
ed the same schedule twice, once with both am
and pm
set to true
and afterwards once with am
set to false
(and overwrite
to true
as well) instead. When fetching the list of schedules I receive two schedules which are identical except for their id
- the schedule has not actually been overwritten (which is what I expected) and the first schedule's am
is reported to be false
as well.
The schedule has the following properties with were passed to the server via the URL:
{
"date": "2020-10-01",
"absence_code": 5,
"user_id": 123456,
"am": true,
"pm": true,
"comment": "Automated by JME",
"symbol": 11,
"overwrite": true
}
What follows is a short rundown of what I did in chronological order:
POST
ed the schedule for the first time. The server returns the correct object.POST
ed the same schedule again but this time with its am
set to false
. The server responds the proper object which is the same as before except for id
, am
, created_at
and updated_at
.In case you need more information feel free to ask.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.